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

Commit 897ff2e8 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

LeAudioService: Change HashMap to LinkedHashMap

This is in order to improve iteration over those maps.

Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
test: Test: atest BluetoothInstrumentationTests
Change-Id: I6925de362bf123cdc7e8c70dace406cf54bdc74f
parent bf557fbf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.modules.utils.SynchronousResultReceiver;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -110,8 +110,8 @@ public class LeAudioService extends ProfileService {
        public Integer mActiveContexts;
    }

    private final Map<Integer, LeAudioGroupDescriptor> mGroupDescriptors = new HashMap<>();
    private final Map<BluetoothDevice, LeAudioStateMachine> mStateMachines = new HashMap<>();
    private final Map<Integer, LeAudioGroupDescriptor> mGroupDescriptors = new LinkedHashMap<>();
    private final Map<BluetoothDevice, LeAudioStateMachine> mStateMachines = new LinkedHashMap<>();

    private final Map<BluetoothDevice, Integer> mDeviceGroupIdMap = new ConcurrentHashMap<>();
    private int mActiveDeviceGroupId = LE_AUDIO_GROUP_ID_INVALID;