From 6ff3500bc9b23cf4e430dc737311c2901e8ae9bc Mon Sep 17 00:00:00 2001 From: SongFerngWang Date: Sat, 13 Aug 2022 03:10:11 +0800 Subject: [PATCH] [LE audio Unicast]To clear the SetMemberPair when BT is turning off Since the device's bond state got stuck at BOND_BONDING, it caused the settings can't connect the member device. It can't recover by airplane mode or restarting the BT. Here resets the flag for recovery. To clear the SetMemberPair flag when the Bluetooth is turning off. Bug: 240380931 Test: build pass. [pass] make RunSettingsLibRoboTests -j40 ROBOTEST_FILTER=CachedBluetoothDeviceManagerTest Change-Id: I6b6ed2537b35be99c5c61749d2ab3ee1d2c35510 --- .../settingslib/bluetooth/CachedBluetoothDeviceManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java index 7fbd10025d607..cd3242a9f7c2d 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java @@ -297,6 +297,9 @@ public class CachedBluetoothDeviceManager { mCachedDevices.remove(i); } } + + // To clear the SetMemberPair flag when the Bluetooth is turning off. + mOngoingSetMemberPair = null; } }