栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Android 5.1系统蓝牙默认打开被发现模式以便手机等外部设备搜索的到蓝牙

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Android 5.1系统蓝牙默认打开被发现模式以便手机等外部设备搜索的到蓝牙

Android 5.1系统默认必须在蓝牙开关设置界面才能被手机等外部设备搜索的到,因需求改为默认打开被发现模式以便手机等外部设备搜索的到蓝牙

diff --git a/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java b/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
index f89404e4d7..c06b167084 100644
--- a/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
+++ b/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
@@ -591,6 +591,9 @@ class AdapterProperties {
                     
                     setDiscoverableTimeout(mDiscoverableTimeout);
             }
+                    setScanMode(AbstractionLayer.BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE);
+                    setDiscoverableTimeout(mDiscoverableTimeout);
         }
     }
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/964244.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号