diff options
| author | 2019-11-25 14:48:46 +0800 | |
|---|---|---|
| committer | 2019-11-25 17:04:06 +0800 | |
| commit | fb0c7ad00c97ea9d64009abf6ade8fe3c99d6623 (patch) | |
| tree | 4220d030d670c4368c1c135af90fedde0b337fbc | |
| parent | 039a30fbd7de3de86d074f0e0af0362da78167a9 (diff) | |
Use new api to disconnect all bt profiles
Fixes: 141582844
Test: make -j42 RunSettingsLibRoboTests
Change-Id: I432c12b60016d2230df625155d3c76dbba926077
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 0095692336e7..833c4ac07633 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -241,9 +241,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> public void disconnect() { synchronized (mProfileLock) { - for (LocalBluetoothProfile profile : mProfiles) { - disconnect(profile); - } + mLocalAdapter.disconnectAllEnabledProfiles(mDevice); } // Disconnect PBAP server in case its connected // This is to ensure all the profiles are disconnected as some CK/Hs do not |