Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ececa85c authored by SongFerng Wang's avatar SongFerng Wang Committed by Gerrit Code Review
Browse files

Merge "[LE] Connect and disconnect both LE headsets"

parents 0979ff10 d936b5bc
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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();
                }
            }
        }
    }