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

Commit f5c0afa0 authored by Junda Liu's avatar Junda Liu
Browse files

Handle unprovisioned ruim and update otasp as needed.

The old code skips updateotasp if ruim is not provisioned, so otasp
needed is never sent to registrants.

Bug: b/17200971
Change-Id: If098dd8e3159f289e3a6c0007e421fd8c40555d2
parent edcd616e
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
            return;
        }

        if (DBG) log("handleMessage: " + msg.what);
        switch (msg.what) {
        case EVENT_POLL_STATE_GPRS:
            if (DBG) log("handleMessage EVENT_POLL_STATE_GPRS");
@@ -95,12 +96,14 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
        case EVENT_RUIM_RECORDS_LOADED:
            updatePhoneObject();
            RuimRecords ruim = (RuimRecords)mIccRecords;
            if ((ruim != null) && ruim.isProvisioned()) {
            if (ruim != null) {
                if (ruim.isProvisioned()) {
                    mMdn = ruim.getMdn();
                    mMin = ruim.getMin();
                    parseSidNid(ruim.getSid(), ruim.getNid());
                    mPrlVersion = ruim.getPrlVersion();
                    mIsMinInfoReady = true;
                }
                updateOtaspState();
            }
            // reload eri in case of IMSI changed
+4 −0
Original line number Diff line number Diff line
@@ -1744,6 +1744,10 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
     */
    int getOtasp() {
        int provisioningState;
        // for ruim, min is null means require otasp.
        if (mIsSubscriptionFromRuim && mMin == null) {
            return OTASP_NEEDED;
        }
        if (mMin == null || (mMin.length() < 6)) {
            if (DBG) log("getOtasp: bad mMin='" + mMin + "'");
            provisioningState = OTASP_UNKNOWN;