Merge "[LE] Connect and disconnect both LE headsets" am: ececa85c9e am: 0567e66c2c am: 254ef629f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2010675 Change-Id: I19f50f9617e6db3f5bc1dcdacee5dde8aafacfd5
This commit is contained in:
@@ -285,6 +285,12 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
|||||||
|
|
||||||
public void disconnect() {
|
public void disconnect() {
|
||||||
synchronized (mProfileLock) {
|
synchronized (mProfileLock) {
|
||||||
|
if (getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) {
|
||||||
|
for (CachedBluetoothDevice member : getMemberDevice()) {
|
||||||
|
Log.d(TAG, "Disconnect the member(" + member.getAddress() + ")");
|
||||||
|
member.disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
mDevice.disconnect();
|
mDevice.disconnect();
|
||||||
}
|
}
|
||||||
// Disconnect PBAP server in case its connected
|
// Disconnect PBAP server in case its connected
|
||||||
@@ -399,6 +405,12 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
|||||||
}
|
}
|
||||||
|
|
||||||
mDevice.connect();
|
mDevice.connect();
|
||||||
|
if (getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) {
|
||||||
|
for (CachedBluetoothDevice member : getMemberDevice()) {
|
||||||
|
Log.d(TAG, "connect the member(" + member.getAddress() + ")");
|
||||||
|
member.connect();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user