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

Commit 4b6af3c0 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

DO NOT MERGE: Use a copy of bt device profile list when updating am: ad08b5b8

Change-Id: Ica618815e50139b662c94ab31cc3c9b5641a07c0
parents 0fa980d4 ad08b5b8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -642,6 +642,10 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
        return Collections.unmodifiableList(mProfiles);
    }

    public List<LocalBluetoothProfile> getProfileListCopy() {
        return new ArrayList<>(mProfiles);
    }

    public List<LocalBluetoothProfile> getConnectableProfiles() {
        List<LocalBluetoothProfile> connectableProfiles =
                new ArrayList<LocalBluetoothProfile>();
+1 −1
Original line number Diff line number Diff line
@@ -277,7 +277,7 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa
        boolean otherProfileConnected = false;

        for (CachedBluetoothDevice device : getDevices()) {
            for (LocalBluetoothProfile profile : device.getProfiles()) {
            for (LocalBluetoothProfile profile : device.getProfileListCopy()) {
                int profileId = profile.getProfileId();
                boolean isConnected = device.isConnectedProfile(profile);
                if (profileId == BluetoothProfile.HEADSET