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

Commit 16a13b95 authored by Xin Guan's avatar Xin Guan
Browse files

Use the correct way to remove the logical ID of UiCC slot.

Bug: 338007388
Test: atest FrameworksMockingServicesTests:FlexibilityControllerTest
Change-Id: I6ea3c236c5bca963fd859b9519db01c5902da0b6
parent c0672ad4
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1771,7 +1771,13 @@ public final class FlexibilityController extends StateController {
                    final int logicalIndex = mapping.getLogicalSlotIndex();
                    if (mCarrierPrivilegedCallbacks.contains(logicalIndex)) {
                        // Callback already exists. No need to create a new one or remove it.
                        callbacksToRemove.remove(logicalIndex);
                        for (int i = callbacksToRemove.size() - 1; i >= 0; i--) {
                            if (callbacksToRemove.get(i) == logicalIndex) {
                                callbacksToRemove.remove(i);
                                break;
                            }
                        }

                        continue;
                    }
                    final LogicalIndexCarrierPrivilegesCallback callback =