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:
jhtop.kim
2011-08-08 19:34:27 +09:00
committed by Jake Hamby
parent d66b61908d
commit 8abbaab8b3

View File

@@ -236,6 +236,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment {
case BluetoothAdapter.STATE_ON: case BluetoothAdapter.STATE_ON:
preferenceScreen.removeAll(); preferenceScreen.removeAll();
preferenceScreen.setOrderingAsAdded(true); preferenceScreen.setOrderingAsAdded(true);
mDevicePreferenceMap.clear();
// This device // This device
if (mMyDevicePreference == null) { if (mMyDevicePreference == null) {