diff options
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index d6f08c663ccd..981d8e403cd6 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -283,6 +283,12 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> public void disconnect() { synchronized (mProfileLock) { + if (getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) { + for (CachedBluetoothDevice member : getMemberDevice()) { + Log.d(TAG, "Disconnect the member(" + member.getAddress() + ")"); + member.disconnect(); + } + } mDevice.disconnect(); } // Disconnect PBAP server in case its connected @@ -397,6 +403,12 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } mDevice.connect(); + if (getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) { + for (CachedBluetoothDevice member : getMemberDevice()) { + Log.d(TAG, "connect the member(" + member.getAddress() + ")"); + member.connect(); + } + } } } |