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

Commit 13c6cf87 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Gerrit Code Review
Browse files

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

parents cf2b86cf c2d29f63
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -3728,6 +3728,17 @@ public class SubscriptionController extends ISub.Stub {
            subIdsList.clear();
            subIdsList.add(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;
    }