Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc5ef4fa authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "MSIM: Fix subId creation issue when one of inserted SIM card state is ERROR"

parents 3ed74f4b bd32b245
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -340,7 +340,7 @@ public class SubscriptionInfoUpdater extends Handler {
                break;

            case EVENT_SIM_IO_ERROR:
                updateCarrierServices(msg.arg1, IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR);
                handleSimError(msg.arg1);
                break;

            case EVENT_SIM_RESTRICTED:
@@ -515,6 +515,17 @@ public class SubscriptionInfoUpdater extends Handler {
        updateCarrierServices(slotId, IccCardConstants.INTENT_VALUE_ICC_ABSENT);
    }

    private void handleSimError(int slotId) {
        if (mIccId[slotId] != null && !mIccId[slotId].equals(ICCID_STRING_FOR_NO_SIM)) {
            logd("SIM" + (slotId + 1) + " Error ");
        }
        mIccId[slotId] = ICCID_STRING_FOR_NO_SIM;
        if (isAllIccIdQueryDone()) {
            updateSubscriptionInfoByIccId();
        }
        updateCarrierServices(slotId, IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR);
    }

    /**
     * TODO: Simplify more, as no one is interested in what happened
     * only what the current list contains.