Merge "[LE] Connect and disconnect both LE headsets"
This commit is contained in:
@@ -283,6 +283,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
|
||||||
@@ -397,6 +403,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