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

Commit 048f6332 authored by Shivakumar Neginal's avatar Shivakumar Neginal Committed by Automerger Merge Worker
Browse files

Merge "(eSim) Return proper portindex for ONS profile." into tm-dev am: 886afec7

parents ec844627 886afec7
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1210,13 +1210,16 @@ public class EuiccController extends IEuiccController.Stub {
        } else {
            // DSDS Mode
            for (int portIndex : slot.getPortList()) {
                if (slot.isPortActive(portIndex)
                        && mSubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(
                        slot.getPhoneIdFromPortIndex(portIndex)) == null) {
                    // If the port is active and empty, return the portIndex.
                if (slot.isPortActive(portIndex)) {
                    SubscriptionInfo subscriptionInfo =
                              mSubscriptionManager.getActiveSubscriptionInfoForSimSlotIndex(
                                    slot.getPhoneIdFromPortIndex(portIndex));
                    if (subscriptionInfo == null || subscriptionInfo.isOpportunistic()) {
                            // If the port is active and empty/opportunistic, return the portIndex.
                        return portIndex;
                    }
                }
            }
            // Check whether the pSim is active and empty
            boolean isPsimEmpty = isPsimActive && !isRemovalNonEuiccSlotHasActiveSubscription();
            if (isPsimEmpty) {