Use new api to disconnect all bt profiles
Fixes: 141582844 Test: make -j42 RunSettingsLibRoboTests Change-Id: I432c12b60016d2230df625155d3c76dbba926077
This commit is contained in:
@@ -241,9 +241,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
|||||||
|
|
||||||
public void disconnect() {
|
public void disconnect() {
|
||||||
synchronized (mProfileLock) {
|
synchronized (mProfileLock) {
|
||||||
for (LocalBluetoothProfile profile : mProfiles) {
|
mLocalAdapter.disconnectAllEnabledProfiles(mDevice);
|
||||||
disconnect(profile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Disconnect PBAP server in case its connected
|
// Disconnect PBAP server in case its connected
|
||||||
// This is to ensure all the profiles are disconnected as some CK/Hs do not
|
// This is to ensure all the profiles are disconnected as some CK/Hs do not
|
||||||
|
|||||||
Reference in New Issue
Block a user