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

Commit ec18aba2 authored by Chaitanya Saggurthi's avatar Chaitanya Saggurthi Committed by Steve Kondik
Browse files

Add dummy SUB record in CDMA NV mode

Add dummy SUB info record when NV is ready in CDMA NV mode.

CRs-Fixed: 789989

Change-Id: Ie658087efaa9f93a329773d2d8f0601d083f3701
parent 6b3b5b83
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2301,6 +2301,10 @@ public class GsmCdmaPhone extends Phone {

            case EVENT_NV_READY:
                Rlog.d(LOG_TAG, "Event EVENT_NV_READY Received");
                SubscriptionInfoUpdater subscriptionInfoUpdater = PhoneFactory.getSubscriptionInfoUpdater();
                if (subscriptionInfoUpdater != null) {
                    subscriptionInfoUpdater.updateSubIdForNV(mPhoneId);
                }
                break;

            case EVENT_SET_VM_NUMBER_DONE:
+10 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ public class SubscriptionInfoUpdater extends Handler {
    private static final int EVENT_SIM_RESTRICTED = 8;

    private static final String ICCID_STRING_FOR_NO_SIM = "";
    private static final String ICCID_STRING_FOR_NV = "DUMMY_NV_ID";
    /**
     *  int[] sInsertSimState maintains all slots' SIM inserted status currently,
     *  it may contain 4 kinds of values:
@@ -537,6 +538,15 @@ public class SubscriptionInfoUpdater extends Handler {
        updateCarrierServices(slotId, simState);
    }

    public void updateSubIdForNV(int slotId) {
        mIccId[slotId] = ICCID_STRING_FOR_NV;
        logd("[updateSubIdForNV]+ Start");
        if (isAllIccIdQueryDone()) {
            logd("[updateSubIdForNV]+ updating");
            updateSubscriptionInfoByIccId();
        }
    }

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