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

@@ -87,8 +87,8 @@ public class SubscriptionUtil {
if (slotInfo == null) {
return false;
}
return !slotInfo.getIsEuicc() && !slotInfo.getIsActive() &&
slotInfo.getCardStateInfo() == CARD_STATE_INFO_PRESENT;
return !slotInfo.getIsEuicc() && !slotInfo.getPorts().stream().findFirst().get()
.isActive() && slotInfo.getCardStateInfo() == CARD_STATE_INFO_PRESENT;
}
/**
@@ -179,7 +179,8 @@ public class SubscriptionUtil {
// verify if subscription is inserted within slot
for (UiccSlotInfo slotInfo : slotsInfo) {
if ((slotInfo != null) && (!slotInfo.getIsEuicc())
&& (slotInfo.getLogicalSlotIdx() == subInfo.getSimSlotIndex())) {
&& (slotInfo.getPorts().stream().findFirst().get().getLogicalSlotIndex()
== subInfo.getSimSlotIndex())) {
return true;
}
}
@@ -576,7 +577,7 @@ public class SubscriptionUtil {
if (!cardInfo.isRemovable()
|| cardInfo.getCardId() == TelephonyManager.UNSUPPORTED_CARD_ID) {
Log.i(TAG, "Skip embedded card or invalid cardId on slot: "
+ cardInfo.getSlotIndex());
+ cardInfo.getPhysicalSlotIndex());
continue;
}
Log.i(TAG, "Target removable cardId :" + cardInfo.getCardId());