Use new api to disconnect all bt profiles

Fixes: 141582844
Test: make -j42 RunSettingsLibRoboTests
Change-Id: I432c12b60016d2230df625155d3c76dbba926077
This commit is contained in:
hughchen
2019-11-25 14:48:46 +08:00
parent 039a30fbd7
commit fb0c7ad00c

View File

@@ -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