Bluetooth : fix for showing paired device list error
- Pair one devie, then turn off BT then reboot the phone and enter Bluetooth settings screen and turn on BT. The last paired device will not be displayed in paired list. - After onResume() is called, the list is shown. - The reason is that mDevicePreferenceMap is not empty. The paired devices are cached when BT is off and then skipped when BT is turned on and updateContent() is called again. - Make the mDevicePreferenceMap clear when updateContent() is called and adapter state is BluetoothAdapter.STATE_ON. Change-Id: Ia745e02bcb4e21a54ccc8477a4dfbad1fa5aed17 Signed-off-by: jhtop.kim <jhtop.kim@samsung.com>
This commit is contained in:
1
src/com/android/settings/bluetooth/BluetoothSettings.java
Normal file → Executable file
1
src/com/android/settings/bluetooth/BluetoothSettings.java
Normal file → Executable file
@@ -236,6 +236,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment {
|
||||
case BluetoothAdapter.STATE_ON:
|
||||
preferenceScreen.removeAll();
|
||||
preferenceScreen.setOrderingAsAdded(true);
|
||||
mDevicePreferenceMap.clear();
|
||||
|
||||
// This device
|
||||
if (mMyDevicePreference == null) {
|
||||
|
Reference in New Issue
Block a user