diff --git a/src/com/android/settings/network/UiccSlotUtil.java b/src/com/android/settings/network/UiccSlotUtil.java index d28d93a8474..c4f495c904f 100644 --- a/src/com/android/settings/network/UiccSlotUtil.java +++ b/src/com/android/settings/network/UiccSlotUtil.java @@ -25,6 +25,7 @@ import android.telephony.UiccSlotInfo; import android.telephony.UiccSlotMapping; import android.util.Log; +import com.android.internal.annotations.VisibleForTesting; import com.android.settingslib.utils.ThreadUtils; import com.google.common.collect.ImmutableList; @@ -33,6 +34,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; import java.util.Collection; +import java.util.Comparator; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -126,7 +128,10 @@ public class UiccSlotUtil { performSwitchToSlot(telMgr, prepareUiccSlotMappings(uiccSlotMappings, - inactiveRemovableSlot, /*removable sim's port Id*/ 0, removedSubInfo, + /*slot is psim*/ true, + inactiveRemovableSlot, + /*removable sim's port Id*/ TelephonyManager.DEFAULT_PORT_INDEX, + removedSubInfo, telMgr.isMultiSimEnabled()), context); } @@ -159,7 +164,7 @@ public class UiccSlotUtil { } performSwitchToSlot(telMgr, - prepareUiccSlotMappings(uiccSlotMappings, + prepareUiccSlotMappings(uiccSlotMappings, /*slot is not psim*/ false, physicalSlotId, port, removedSubInfo, telMgr.isMultiSimEnabled()), context); } @@ -251,9 +256,27 @@ public class UiccSlotUtil { return INVALID_PHYSICAL_SLOT_ID; } - private static Collection prepareUiccSlotMappings( - Collection uiccSlotMappings, int physicalSlotId, int port, - SubscriptionInfo removedSubInfo, boolean isMultiSimEnabled) { + // Device | |Slot | + // Working| |Mapping| + // State |Type |Mode |Friendly name + //-------------------------------------------------------------------------- + // Single |SIM pSIM [RIL 0] |1 |pSIM active + // Single |SIM MEP Port #0 [RIL0] |2 |eSIM Port0 active + // Single |SIM MEP Port #1 [RIL0] |2.1 |eSIM Port1 active + // DSDS |pSIM [RIL 0] + MEP Port #0 [RIL 1] |3 |pSIM+Port0 + // DSDS |pSIM [RIL 0] + MEP Port #1 [RIL 1] |3.1 |pSIM+Port1 + // DSDS |MEP Port #0 [RIL 0] + MEP Port #1 [RIL1]|3.2 |Dual-Ports-A + // DSDS |MEP Port #1 [RIL 0] + MEP Port #0 [RIL1]|4 |Dual-Ports-B + // + // The rules are: + // 1. pSIM's logical slots always is [RIL 0]. + // 2. assign the new active port to the same stack that will be de-activated + // For example: mode#3->mode#4 + + @VisibleForTesting + static Collection prepareUiccSlotMappings( + Collection uiccSlotMappings, boolean isPsim, int physicalSlotId, + int port, SubscriptionInfo removedSubInfo, boolean isMultiSimEnabled) { Collection newUiccSlotMappings = new ArrayList<>(); if (!isMultiSimEnabled) { // In the 'SS mode', the port is 0. @@ -268,25 +291,59 @@ public class UiccSlotUtil { + "PhysicalSlotId%d-Port%d", removedSubInfo.getSubscriptionId(), removedSubInfo.getSimSlotIndex(), removedSubInfo.getPortIndex(), physicalSlotId, port)); + + int logicalSlotIndex = 0; + if (isPsim) { + // The target slot is psim + newUiccSlotMappings.add( + new UiccSlotMapping(port, physicalSlotId, logicalSlotIndex++)); + } + Collection tempUiccSlotMappings = + uiccSlotMappings.stream() + .sorted(Comparator.comparingInt(UiccSlotMapping::getLogicalSlotIndex)) + .collect(Collectors.toList()); + for (UiccSlotMapping uiccSlotMapping : tempUiccSlotMappings) { + if (isSubInfoMappingIntoUiccSlotMapping(uiccSlotMapping, removedSubInfo)) { + if (!isPsim) { + // Replace this uiccSlotMapping + newUiccSlotMappings.add(new UiccSlotMapping(port, physicalSlotId, + uiccSlotMapping.getLogicalSlotIndex())); + } + continue; + } + + // If the psim is inserted, then change the + // logicalSlotIndex for another uiccSlotMappings. + newUiccSlotMappings.add(isPsim + ? new UiccSlotMapping( + uiccSlotMapping.getPortIndex(), + uiccSlotMapping.getPhysicalSlotIndex(), + logicalSlotIndex++ + ) : uiccSlotMapping); + } + } else { + // For no inserted psim case in DSDS+MEP, there is only one esim in device and + // then user inserts another esim in DSDS+MEP. + // If the target is esim, then replace the psim. + Log.i(TAG, "The removedSubInfo is null"); newUiccSlotMappings = uiccSlotMappings.stream().map(uiccSlotMapping -> { - if (uiccSlotMapping.getLogicalSlotIndex() - == removedSubInfo.getSimSlotIndex() - && uiccSlotMapping.getPortIndex() - == removedSubInfo.getPortIndex()) { + if (!isPsim && uiccSlotMapping.getPhysicalSlotIndex() != physicalSlotId) { return new UiccSlotMapping(port, physicalSlotId, uiccSlotMapping.getLogicalSlotIndex()); } return uiccSlotMapping; }).collect(Collectors.toList()); - } else { - // DSDS+no MEP - // The removable slot should be in UiccSlotMapping. - newUiccSlotMappings = uiccSlotMappings; - Log.i(TAG, "The removedSubInfo is null"); } Log.i(TAG, "The SimSlotMapping: " + newUiccSlotMappings); return newUiccSlotMappings; } + + private static boolean isSubInfoMappingIntoUiccSlotMapping(UiccSlotMapping uiccSlotMapping, + SubscriptionInfo subscriptionInfo) { + return uiccSlotMapping != null + && uiccSlotMapping.getLogicalSlotIndex() == subscriptionInfo.getSimSlotIndex() + && uiccSlotMapping.getPortIndex() == subscriptionInfo.getPortIndex(); + } } diff --git a/tests/unit/src/com/android/settings/network/UiccSlotUtilTest.java b/tests/unit/src/com/android/settings/network/UiccSlotUtilTest.java index 1a6879dea0b..8a0a4b0d3b9 100644 --- a/tests/unit/src/com/android/settings/network/UiccSlotUtilTest.java +++ b/tests/unit/src/com/android/settings/network/UiccSlotUtilTest.java @@ -24,9 +24,11 @@ import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; import android.content.Context; +import android.telephony.SubscriptionInfo; import android.telephony.TelephonyManager; import android.telephony.UiccPortInfo; import android.telephony.UiccSlotInfo; +import android.telephony.UiccSlotMapping; import androidx.test.core.app.ApplicationProvider; import androidx.test.ext.junit.runners.AndroidJUnit4; @@ -39,8 +41,12 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; +import java.util.Iterator; +import java.util.List; @RunWith(AndroidJUnit4.class) public class UiccSlotUtilTest { @@ -48,6 +54,9 @@ public class UiccSlotUtilTest { @Mock private TelephonyManager mTelephonyManager; + private static final int ESIM_PHYSICAL_SLOT = 0; + private static final int PSIM_PHYSICAL_SLOT = 1; + @Before public void setUp() { MockitoAnnotations.initMocks(this); @@ -58,7 +67,7 @@ public class UiccSlotUtilTest { @Test public void getSlotInfos_oneSimSlotDevice_returnTheCorrectSlotInfoList() { - when(mTelephonyManager.getUiccSlotsInfo()).thenReturn(oneSimSlotDevice_ActivePsim()); + when(mTelephonyManager.getUiccSlotsInfo()).thenReturn(oneSimSlotDeviceActivePsim()); ImmutableList testUiccSlotInfos = UiccSlotUtil.getSlotInfos(mTelephonyManager); @@ -68,7 +77,7 @@ public class UiccSlotUtilTest { @Test public void getSlotInfos_twoSimSlotsDevice_returnTheCorrectSlotInfoList() { when(mTelephonyManager.getUiccSlotsInfo()).thenReturn( - twoSimSlotsDevice_ActivePsimActiveEsim()); + twoSimSlotsDeviceActivePsimActiveEsim()); ImmutableList testUiccSlotInfos = UiccSlotUtil.getSlotInfos(mTelephonyManager); @@ -78,7 +87,7 @@ public class UiccSlotUtilTest { @Test public void getEsimSlotId_twoSimSlotsDeviceAndEsimIsSlot0_returnTheCorrectEsimSlot() { when(mTelephonyManager.getUiccSlotsInfo()).thenReturn( - twoSimSlotsDevice_ActiveEsimActivePsim()); + twoSimSlotsDeviceActiveEsimActivePsim()); int testSlot = UiccSlotUtil.getEsimSlotId(mContext); assertThat(testSlot).isEqualTo(0); @@ -87,7 +96,7 @@ public class UiccSlotUtilTest { @Test public void getEsimSlotId_twoSimSlotsDeviceAndEsimIsSlot1_returnTheCorrectEsimSlot() { when(mTelephonyManager.getUiccSlotsInfo()).thenReturn( - twoSimSlotsDevice_ActivePsimActiveEsim()); + twoSimSlotsDeviceActivePsimActiveEsim()); int testSlot = UiccSlotUtil.getEsimSlotId(mContext); assertThat(testSlot).isEqualTo(1); @@ -96,12 +105,253 @@ public class UiccSlotUtilTest { @Test public void getEsimSlotId_noEimSlotDevice_returnTheCorrectEsimSlot() { when(mTelephonyManager.getUiccSlotsInfo()).thenReturn( - oneSimSlotDevice_ActivePsim()); + oneSimSlotDeviceActivePsim()); int testSlot = UiccSlotUtil.getEsimSlotId(mContext); assertThat(testSlot).isEqualTo(-1); } + @Test + public void prepareUiccSlotMappings_fromPsimActiveToEsimPort0Active_esimPort0Active() { + Collection uiccSlotMappings = createUiccSlotMappingSsModePsimActive(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingSsModeEsimPort0Active(); + + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, false, ESIM_PHYSICAL_SLOT, 0, null, false); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromEsimPort0ActiveToPsimActive_psimActive() { + Collection uiccSlotMappings = + createUiccSlotMappingSsModeEsimPort0Active(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingSsModePsimActive(); + + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, true, PSIM_PHYSICAL_SLOT, 0, null, false); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromPsimAndPort0ToPsimAndPort1_psimAndPort1() { + Collection uiccSlotMappings = createUiccSlotMappingPsimAndPort0(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingPsimAndPort1(); + SubscriptionInfo subInfo = createSubscriptionInfo(1, 0); + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, false, ESIM_PHYSICAL_SLOT, 1, subInfo, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromPsimAndPort1ToPsimAndPort0_psimAndPort0() { + Collection uiccSlotMappings = createUiccSlotMappingPsimAndPort1(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingPsimAndPort0(); + + SubscriptionInfo subInfo = createSubscriptionInfo(1, 1); + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, false, ESIM_PHYSICAL_SLOT, 0, subInfo, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromPsimAndPort0ToDualPortsB_dualPortsB() { + Collection uiccSlotMappings = createUiccSlotMappingPsimAndPort0(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingDualPortsB(); + + SubscriptionInfo subInfo = createSubscriptionInfo(0, 0); + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, false, ESIM_PHYSICAL_SLOT, 1, subInfo, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromPsimAndPort1ToDualPortsA_dualPortsA() { + Collection uiccSlotMappings = createUiccSlotMappingPsimAndPort1(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingDualPortsA(); + + SubscriptionInfo subInfo = createSubscriptionInfo(0, 0); + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, false, ESIM_PHYSICAL_SLOT, 0, subInfo, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_noPsimAndFromPsimAndPort0ToDualPortsB_dualPortsB() { + Collection uiccSlotMappings = createUiccSlotMappingPsimAndPort0(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingDualPortsB(); + + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, false, ESIM_PHYSICAL_SLOT, 1, null, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_noPsimAndFromPsimAndPort1ToDualPortsA_dualPortsA() { + Collection uiccSlotMappings = createUiccSlotMappingPsimAndPort1(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingDualPortsA(); + + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, false, ESIM_PHYSICAL_SLOT, 0, null, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromDualPortsAToPsimAndPort1_psimAndPort1() { + Collection uiccSlotMappings = createUiccSlotMappingDualPortsA(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingPsimAndPort1(); + + SubscriptionInfo subInfo = createSubscriptionInfo(0, 0); + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, true, PSIM_PHYSICAL_SLOT, 0, subInfo, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromDualPortsAToPsimAndPort0_psimAndPort0() { + Collection uiccSlotMappings = createUiccSlotMappingDualPortsA(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingPsimAndPort0(); + + SubscriptionInfo subInfo = createSubscriptionInfo(1, 1); + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, true, PSIM_PHYSICAL_SLOT, 0, subInfo, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromDualPortsBToPsimAndPort1_psimAndPort1() { + Collection uiccSlotMappings = createUiccSlotMappingDualPortsB(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingPsimAndPort1(); + + SubscriptionInfo subInfo = createSubscriptionInfo(1, 0); + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, true, PSIM_PHYSICAL_SLOT, 0, subInfo, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + @Test + public void prepareUiccSlotMappings_fromDualPortsBToPsimAndPort0_psimAndPort0() { + Collection uiccSlotMappings = createUiccSlotMappingDualPortsB(); + Collection verifyUiccSlotMappings = + createUiccSlotMappingPsimAndPort0(); + + SubscriptionInfo subInfo = createSubscriptionInfo(0, 1); + Collection testUiccSlotMappings = UiccSlotUtil.prepareUiccSlotMappings( + uiccSlotMappings, true, PSIM_PHYSICAL_SLOT, 0, subInfo, true); + + compareTwoUiccSlotMappings(testUiccSlotMappings, verifyUiccSlotMappings); + } + + private SubscriptionInfo createSubscriptionInfo(int logicalSlotIndex, int portIndex) { + return new SubscriptionInfo( + 0, "", logicalSlotIndex, "", "", 0, 0, "", 0, null, "", "", "", + true /* isEmbedded */, + null, "", 25, + false, null, false, 0, 0, 0, null, null, true, portIndex); + } + + private void compareTwoUiccSlotMappings(Collection testUiccSlotMappings, + Collection verifyUiccSlotMappings) { + assertThat(testUiccSlotMappings.size()).isEqualTo(verifyUiccSlotMappings.size()); + Iterator testIterator = testUiccSlotMappings.iterator(); + Iterator verifyIterator = verifyUiccSlotMappings.iterator(); + while (testIterator.hasNext()) { + UiccSlotMapping testUiccSlotMapping = testIterator.next(); + UiccSlotMapping verifyUiccSlotMapping = verifyIterator.next(); + assertThat(testUiccSlotMapping.getLogicalSlotIndex()).isEqualTo( + verifyUiccSlotMapping.getLogicalSlotIndex()); + assertThat(testUiccSlotMapping.getPortIndex()).isEqualTo( + verifyUiccSlotMapping.getPortIndex()); + assertThat(testUiccSlotMapping.getPhysicalSlotIndex()).isEqualTo( + verifyUiccSlotMapping.getPhysicalSlotIndex()); + } + } + + // Device | |Slot | + // Working| |Mapping| + // State |Type |Mode |Friendly name + //-------------------------------------------------------------------------- + // Single |SIM pSIM [RIL 0] |1 |pSIM active + // Single |SIM MEP Port #0 [RIL0] |2 |eSIM Port0 active + // Single |SIM MEP Port #1 [RIL0] |2.1 |eSIM Port1 active + // DSDS |pSIM [RIL 0] + MEP Port #0 [RIL 1] |3 |pSIM+Port0 + // DSDS |pSIM [RIL 0] + MEP Port #1 [RIL 1] |3.1 |pSIM+Port1 + // DSDS |MEP Port #0 [RIL 0] + MEP Port #1 [RIL1]|3.2 |Dual-Ports-A + // DSDS |MEP Port #1 [RIL 0] + MEP Port #0 [RIL1]|4 |Dual-Ports-B + private List createUiccSlotMappingSsModePsimActive() { + List slotMap = new ArrayList<>(); + slotMap.add(new UiccSlotMapping(0, PSIM_PHYSICAL_SLOT, 0)); + + return slotMap; + } + + private List createUiccSlotMappingSsModeEsimPort0Active() { + List slotMap = new ArrayList<>(); + slotMap.add(new UiccSlotMapping(0, ESIM_PHYSICAL_SLOT, 0)); + + return slotMap; + } + + private List createUiccSlotMappingSsModeEsimPort1Active() { + List slotMap = new ArrayList<>(); + slotMap.add(new UiccSlotMapping(1, ESIM_PHYSICAL_SLOT, 0)); + + return slotMap; + } + + private List createUiccSlotMappingPsimAndPort0() { + List slotMap = new ArrayList<>(); + slotMap.add(new UiccSlotMapping(0, PSIM_PHYSICAL_SLOT, 0)); + slotMap.add(new UiccSlotMapping(0, ESIM_PHYSICAL_SLOT, 1)); + + return slotMap; + } + + private List createUiccSlotMappingPsimAndPort1() { + List slotMap = new ArrayList<>(); + slotMap.add(new UiccSlotMapping(0, PSIM_PHYSICAL_SLOT, 0)); + slotMap.add(new UiccSlotMapping(1, ESIM_PHYSICAL_SLOT, 1)); + + return slotMap; + } + + private List createUiccSlotMappingDualPortsA() { + List slotMap = new ArrayList<>(); + slotMap.add(new UiccSlotMapping(0, ESIM_PHYSICAL_SLOT, 0)); + slotMap.add(new UiccSlotMapping(1, ESIM_PHYSICAL_SLOT, 1)); + + return slotMap; + } + + private List createUiccSlotMappingDualPortsB() { + List slotMap = new ArrayList<>(); + slotMap.add(new UiccSlotMapping(1, ESIM_PHYSICAL_SLOT, 0)); + slotMap.add(new UiccSlotMapping(0, ESIM_PHYSICAL_SLOT, 1)); + + return slotMap; + } + /** * The "oneSimSlotDevice" has below cases * 1) The device is one psim slot and no esim slot @@ -112,27 +362,27 @@ public class UiccSlotUtilTest { * 2) The device is two psim slots */ - private UiccSlotInfo[] oneSimSlotDevice_ActivePsim() { + private UiccSlotInfo[] oneSimSlotDeviceActivePsim() { return new UiccSlotInfo[]{createUiccSlotInfo(false, true, 0, true)}; } - private UiccSlotInfo[] oneSimSlotDevice_ActiveEsim() { + private UiccSlotInfo[] oneSimSlotDeviceActiveEsim() { return new UiccSlotInfo[]{createUiccSlotInfo(true, false, 1, true)}; } - private UiccSlotInfo[] twoSimSlotsDevice_ActivePsimActiveEsim() { + private UiccSlotInfo[] twoSimSlotsDeviceActivePsimActiveEsim() { return new UiccSlotInfo[]{ createUiccSlotInfo(false, true, 0, true), createUiccSlotInfo(true, false, 1, true)}; } - private UiccSlotInfo[] twoSimSlotsDevice_ActiveEsimActivePsim() { + private UiccSlotInfo[] twoSimSlotsDeviceActiveEsimActivePsim() { return new UiccSlotInfo[]{ createUiccSlotInfo(true, false, 0, true), createUiccSlotInfo(false, true, 1, true)}; } - private UiccSlotInfo[] twoSimSlotsDevice_twoActiveEsims() { + private UiccSlotInfo[] twoSimSlotsDeviceTwoActiveEsims() { // device supports MEP, so device can enable two esims. // If device has psim slot, the UiccSlotInfo of psim always be in UiccSlotInfo[]. return new UiccSlotInfo[]{ @@ -140,19 +390,19 @@ public class UiccSlotUtilTest { createUiccSlotInfoForEsimMep(0, true, 1, true)}; } - private UiccSlotInfo[] twoSimSlotsDevice_ActivePsimInactiveEsim() { + private UiccSlotInfo[] twoSimSlotsDeviceActivePsimInactiveEsim() { return new UiccSlotInfo[]{ createUiccSlotInfo(false, true, 0, true), createUiccSlotInfo(true, false, -1, false)}; } - private UiccSlotInfo[] twoSimSlotsDevice_InactivePsimActiveEsim() { + private UiccSlotInfo[] twoSimSlotsDeviceInactivePsimActiveEsim() { return new UiccSlotInfo[]{ createUiccSlotInfo(false, true, 0, false), createUiccSlotInfo(true, false, 1, true)}; } - private UiccSlotInfo[] twoSimSlotsDevice_NoInsertPsimActiveEsim() { + private UiccSlotInfo[] twoSimSlotsDeviceNoInsertPsimActiveEsim() { return new UiccSlotInfo[]{ createUiccSlotInfo(false, true, -1, false), createUiccSlotInfo(true, false, 1, true)};