文章目录
开发平台基本信息问题描述解决方法1.默认关闭蓝牙2.开启蓝牙状态栏不显示图标开发平台基本信息
芯片:MSM8953_64
版本:Android 10
kernel:msm-4.9
问题描述
Android 10默认自动开启蓝牙,需要默认关闭开机之后,手动开启蓝牙,状态栏没有显示蓝牙图标解决方法
1.默认关闭蓝牙
--- a/frameworks/base/packages/SettingsProvider/res/values/defaults.xml+++ b/frameworks/base/packages/SettingsProvider/res/values/defaults.xml@@ -36,7 +36,7 @@<fraction name="def_window_transition_scale">100%</fraction><bool name="def_haptic_feedback">true</bool>- <bool name="def_bluetooth_on">true</bool>+ <bool name="def_bluetooth_on">false</bool><bool name="def_wifi_display_on">false</bool><bool name="def_install_non_market_apps">false</bool><bool name="def_package_verifier_enable">true</bool>
2.开启蓝牙状态栏不显示图标
--- a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java+++ b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java@@ -382,12 +382,13 @@ public class PhoneStatusBarPolicymContext.getString(R.string.accessibility_quick_settings_bluetooth_on);boolean bluetoothVisible = false;if (mBluetooth != null) {+ bluetoothVisible = mBluetooth.isBluetoothEnabled();if (mBluetooth.isBluetoothConnected()&& (mBluetooth.isBluetoothAudioActive()|| !mBluetooth.isBluetoothAudioProfileOnly())) {contentDescription = mContext.getString(R.string.accessibility_bluetooth_connected);-bluetoothVisible = mBluetooth.isBluetoothEnabled();+//bluetoothVisible = mBluetooth.isBluetoothEnabled();}}