eSIM deprecated API test Refactoring

Test: build
Bug: 159354974
Change-Id: Iedeb90f186ab9f82894e2fecef86d339c8989542
This commit is contained in:
sandeepjs
2021-09-30 09:09:59 +00:00
parent 666d0984d4
commit 40ffe69a3e
8 changed files with 165 additions and 55 deletions

View File

@@ -96,7 +96,7 @@ public class UiccSlotUtil {
if (slotId == INVALID_PHYSICAL_SLOT_ID) {
for (int i = 0; i < slots.length; i++) {
if (slots[i].isRemovable()
&& !slots[i].getIsActive()
&& !slots[i].getPorts().stream().findFirst().get().isActive()
&& slots[i].getCardStateInfo() != UiccSlotInfo.CARD_STATE_INFO_ERROR
&& slots[i].getCardStateInfo() != UiccSlotInfo.CARD_STATE_INFO_RESTRICTED) {
performSwitchToRemovableSlot(i, context);
@@ -107,7 +107,7 @@ public class UiccSlotUtil {
if (slotId >= slots.length || !slots[slotId].isRemovable()) {
throw new UiccSlotsException("The given slotId is not a removable slot: " + slotId);
}
if (!slots[slotId].getIsActive()) {
if (!slots[slotId].getPorts().stream().findFirst().get().isActive()) {
performSwitchToRemovableSlot(slotId, context);
}
}