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

Commit bd2b531a authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix removing group descriptors"

parents 1c04fad2 8a0aba5e
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -332,8 +332,6 @@ public class LeAudioService extends ProfileService {
            }
        }

        mGroupDescriptors.remove(groupId);

        return true;
    }

@@ -652,11 +650,16 @@ public class LeAudioService extends ProfileService {
            switch (node_status) {
                case LeAudioStackEvent.GROUP_NODE_ADDED:
                    mDeviceGroupIdMap.put(device, group_id);
                    LeAudioGroupDescriptor descriptor = mGroupDescriptors.get(group_id);
                    if (descriptor == null) {
                        mGroupDescriptors.put(group_id, new LeAudioGroupDescriptor());
                    }
                    break;
                case LeAudioStackEvent.GROUP_NODE_REMOVED:
                    mDeviceGroupIdMap.remove(device);
                    if (mDeviceGroupIdMap.containsValue(group_id) == false) {
                        mGroupDescriptors.remove(group_id);
                    }
                    break;
                default:
                    break;