[MEP] The removale slot can read the esim card

Revert the wrong logic for removale slot part at ag/18579901,
the removable slot can read the esim card.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ic2ac6a5cc4d5846b8b1e2ca766348f239bb1b719
Merged-In: Ic2ac6a5cc4d5846b8b1e2ca766348f239bb1b719
This commit is contained in:
SongFerngWang
2022-05-27 16:40:31 +08:00
committed by SongFerng Wang
parent 82bf2a66b7
commit 7d71d3f451
4 changed files with 2 additions and 5 deletions

View File

@@ -190,8 +190,7 @@ public class EnableMultiSimSidecar extends AsyncTaskSidecar<Void, Boolean> {
Set<Integer> activeRemovableLogicalSlotIds = new ArraySet<>(); Set<Integer> activeRemovableLogicalSlotIds = new ArraySet<>();
for (UiccSlotInfo info : infos) { for (UiccSlotInfo info : infos) {
for (UiccPortInfo portInfo :info.getPorts()) { for (UiccPortInfo portInfo :info.getPorts()) {
if (info != null && portInfo.isActive() && info.isRemovable() if (info != null && portInfo.isActive() && info.isRemovable()) {
&& !info.getIsEuicc()) {
activeRemovableLogicalSlotIds.add(portInfo.getLogicalSlotIndex()); activeRemovableLogicalSlotIds.add(portInfo.getLogicalSlotIndex());
} }
} }

View File

@@ -249,7 +249,6 @@ public class UiccSlotUtil {
if (slotId == INVALID_PHYSICAL_SLOT_ID) { if (slotId == INVALID_PHYSICAL_SLOT_ID) {
for (int i = 0; i < slots.length; i++) { for (int i = 0; i < slots.length; i++) {
if (slots[i].isRemovable() if (slots[i].isRemovable()
&& !slots[i].getIsEuicc()
&& !slots[i].getPorts().stream().findFirst().get().isActive() && !slots[i].getPorts().stream().findFirst().get().isActive()
&& slots[i].getCardStateInfo() != UiccSlotInfo.CARD_STATE_INFO_ERROR && slots[i].getCardStateInfo() != UiccSlotInfo.CARD_STATE_INFO_ERROR
&& slots[i].getCardStateInfo() != UiccSlotInfo.CARD_STATE_INFO_RESTRICTED) { && slots[i].getCardStateInfo() != UiccSlotInfo.CARD_STATE_INFO_RESTRICTED) {

View File

@@ -589,7 +589,6 @@ public class ToggleSubscriptionDialogActivity extends SubscriptionActionDialogAc
.anyMatch( .anyMatch(
slot -> slot != null slot -> slot != null
&& slot.isRemovable() && slot.isRemovable()
&& !slot.getIsEuicc()
&& slot.getPorts().stream().anyMatch( && slot.getPorts().stream().anyMatch(
port -> port.isActive()) port -> port.isActive())
&& slot.getCardStateInfo() && slot.getCardStateInfo()

View File

@@ -294,7 +294,7 @@ public class SimSlotChangeHandler {
return null; return null;
} }
for (UiccSlotInfo slotInfo : slotInfos) { for (UiccSlotInfo slotInfo : slotInfos) {
if (slotInfo != null && slotInfo.isRemovable() && !slotInfo.getIsEuicc()) { if (slotInfo != null && slotInfo.isRemovable()) {
return slotInfo; return slotInfo;
} }
} }