Changing the condition since the esim may be removable
The condition whether the slot is esim slot should use getIsEuicc api since the esim may be removable. Bug: 233338345 Test: atest UiccSlotUtilTest Change-Id: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
This commit is contained in:
@@ -92,6 +92,14 @@ public class UiccSlotUtilTest {
|
||||
|
||||
assertThat(testSlot).isEqualTo(0);
|
||||
}
|
||||
@Test
|
||||
public void getEsimSlotId_twoSimSlotsDeviceAndRemovableEsimIsSlot1_returnTheCorrectEsimSlot() {
|
||||
when(mTelephonyManager.getUiccSlotsInfo()).thenReturn(
|
||||
twoSimSlotsDeviceActivePsimActiveRemovableEsim());
|
||||
int testSlot = UiccSlotUtil.getEsimSlotId(mContext);
|
||||
|
||||
assertThat(testSlot).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getEsimSlotId_twoSimSlotsDeviceAndEsimIsSlot1_returnTheCorrectEsimSlot() {
|
||||
@@ -729,6 +737,12 @@ public class UiccSlotUtilTest {
|
||||
createUiccSlotInfo(true, false, 1, true)};
|
||||
}
|
||||
|
||||
private UiccSlotInfo[] twoSimSlotsDeviceActivePsimActiveRemovableEsim() {
|
||||
return new UiccSlotInfo[]{
|
||||
createUiccSlotInfo(false, true, 0, true),
|
||||
createUiccSlotInfo(true, true, 1, true)};
|
||||
}
|
||||
|
||||
private UiccSlotInfo[] twoSimSlotsDeviceActiveEsimActivePsim() {
|
||||
return new UiccSlotInfo[]{
|
||||
createUiccSlotInfo(true, false, 0, true),
|
||||
|
Reference in New Issue
Block a user