diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 233e798c8578f..52bbac7cbb054 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -282,6 +282,12 @@ public class CachedBluetoothDevice implements Comparable 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 @@ -396,6 +402,12 @@ public class CachedBluetoothDevice implements Comparable } mDevice.connect(); + if (getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) { + for (CachedBluetoothDevice member : getMemberDevice()) { + Log.d(TAG, "connect the member(" + member.getAddress() + ")"); + member.connect(); + } + } } }