问题: 公司定制了一个新的设置应用,其中加了蓝牙功能;打开蓝牙时,手机扫描不到设备
问题分析:打开蓝牙时需要设置蓝牙活跃的时间,默认是120s;原生的会弹出一个diaolog,点击允许手机也可以正常扫描到,但是如果
auto_confirm_bluetooth_activation_dialog 默认为true后,手机就扫描不到设备了.
后面发现,蓝牙打开是需要一定时间的,auto_confirm_bluetooth_activation_dialog默认打开,方法走完后,蓝牙其实还未打开,所以需要做延时操作
--- a/sprd/packages/apps/Settings/res/values/config.xml
+++ b/sprd/packages/apps/Settings/res/values/config.xml
@@ -261,7 +261,7 @@
<!-- Whether the bluetooth activation confirmation dialogs should be auto dismissed.
Can be overridden for specific product builds. -->
- <bool name="auto_confirm_bluetooth_activation_dialog">false</bool>
+ <bool name="auto_confirm_bluetooth_activation_dialog">true</bool><!--modify by luoyalong 20210827 for remove dialog when open BT-->
<!-- Whether the device name is shown in About device or not -->
<bool name="config_sh