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

Commit 3cdff517 authored by Sandeep Gutta's avatar Sandeep Gutta Committed by android-build-merger
Browse files

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

am: bc5ef4fa

Change-Id: I107843b4a461f7702877e733abd7c05f78d51496
parents 26d16a3d bc5ef4fa
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.