Merge "Use new api to disconnect all bt profiles"

This commit is contained in:
TreeHugger Robot
2019-11-25 10:49:43 +00:00
committed by Android (Google) Code Review

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