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:
@@ -193,7 +193,7 @@ public class UiccSlotUtil {
|
||||
if (slotInfo == null) {
|
||||
return false;
|
||||
}
|
||||
return !slotInfo.isRemovable();
|
||||
return slotInfo.getIsEuicc();
|
||||
})
|
||||
.findFirst().orElse(-1);
|
||||
|
||||
@@ -249,6 +249,7 @@ public class UiccSlotUtil {
|
||||
if (slotId == INVALID_PHYSICAL_SLOT_ID) {
|
||||
for (int i = 0; i < slots.length; i++) {
|
||||
if (slots[i].isRemovable()
|
||||
&& !slots[i].getIsEuicc()
|
||||
&& !slots[i].getPorts().stream().findFirst().get().isActive()
|
||||
&& slots[i].getCardStateInfo() != UiccSlotInfo.CARD_STATE_INFO_ERROR
|
||||
&& slots[i].getCardStateInfo() != UiccSlotInfo.CARD_STATE_INFO_RESTRICTED) {
|
||||
|
Reference in New Issue
Block a user