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

Commit c1ea1a91 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...

Merge "MSIM: Fix subId creation issue when one of inserted SIM card state is ERROR" am: bc5ef4fa am: 3cdff517
am: 75c74e36

Change-Id: Ia96426248353a759d9d69bc3dca044392b5b4d6b
parents 14fb543c 75c74e36
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -328,7 +328,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:
@@ -497,6 +497,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.