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

Commit a7b4636e authored by Josh Hou's avatar Josh Hou Committed by Automerger Merge Worker
Browse files

Merge "Remove slot ids from sSlotIndexToSubIds if they have the same sub id"...

Merge "Remove slot ids from sSlotIndexToSubIds if they have the same sub id" into rvc-dev am: f4b8e278 am: 493d3f80 am: 04e48435

Change-Id: Ie7ca62cef27ecf6f7ac6d99ffbd116265e0de1a2
parents 867714d2 04e48435
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -3943,6 +3943,17 @@ public class SubscriptionController extends ISub.Stub {
            sSlotIndexToSubIds.clearSubIdList(slotIndex);
            sSlotIndexToSubIds.addToSubIdList(slotIndex, subId);
        }


        // Remove the slot from sSlotIndexToSubIds if it has the same sub id with the added slot
        for (Entry<Integer, ArrayList<Integer>> entry : sSlotIndexToSubIds.entrySet()) {
            if (entry.getKey() != slotIndex && entry.getValue() != null
                    && entry.getValue().contains(subId)) {
                logdl("addToSubIdList - remove " + entry.getKey());
                sSlotIndexToSubIds.remove(entry.getKey());
            }
        }

        if (DBG) logdl("slotIndex, subId combo is added to the map.");
        return true;
    }