From c78fb83aeedb5ce5f9bcef0817f1a92e817c75fd Mon Sep 17 00:00:00 2001 From: Alice Kuo Date: Tue, 28 Sep 2021 18:02:41 +0800 Subject: [PATCH] Do not update the previously connected devices for the sub device As bluetooth turn on, and device reboot, UI will show the sub device entry for hearing aid device or csip device. Check if the device is a sub device, do not update the cachedDevice information. Bug: 150670922 Bug: 178981521 Test: bonded with a coordinated set. Check the UI only have one entry as Bluetooth turn on and device reboot. Change-Id: I03dfdc25b57e614194fb8de2c9265edd50760d30 Merged-In: I03dfdc25b57e614194fb8de2c9265edd50760d30 --- .../android/settings/bluetooth/SavedBluetoothDeviceUpdater.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/bluetooth/SavedBluetoothDeviceUpdater.java b/src/com/android/settings/bluetooth/SavedBluetoothDeviceUpdater.java index dab4f231e35..f5bc279b8a3 100644 --- a/src/com/android/settings/bluetooth/SavedBluetoothDeviceUpdater.java +++ b/src/com/android/settings/bluetooth/SavedBluetoothDeviceUpdater.java @@ -65,7 +65,7 @@ public class SavedBluetoothDeviceUpdater extends BluetoothDeviceUpdater removePreferenceIfNecessary(bluetoothDevices, cachedManager); for (BluetoothDevice device : bluetoothDevices) { final CachedBluetoothDevice cachedDevice = cachedManager.findDevice(device); - if (cachedDevice != null) { + if (cachedDevice != null && !cachedManager.isSubDevice(device)) { update(cachedDevice); } }