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

Commit da79e5d5 authored by Ying Xu's avatar Ying Xu Committed by Gerrit Code Review
Browse files

Merge "Modify the SIM state "Ready" and "Loaded""

parents 457db48e ea3a4caa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1297,6 +1297,7 @@ public class RadioResponse extends IRadioResponse.Stub {
            appStatus.pin1           = appStatus.PinStateFromRILInt(rilAppStatus.pin1);
            appStatus.pin2           = appStatus.PinStateFromRILInt(rilAppStatus.pin2);
            iccCardStatus.mApplications[i] = appStatus;
            mRil.riljLog("IccCardApplicationStatus " + i + ":" + appStatus.toString());
        }
        return iccCardStatus;
    }
+11 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ public abstract class IccRecords extends Handler implements IccConstants {

    // ***** Instance Variables
    protected AtomicBoolean mDestroyed = new AtomicBoolean(false);
    protected AtomicBoolean mLoaded = new AtomicBoolean(false);
    protected Context mContext;
    protected CommandsInterface mCi;
    protected IccFileHandler mFh;
@@ -250,6 +251,7 @@ public abstract class IccRecords extends Handler implements IccConstants {
        if (mAdnCache != null) {
            mAdnCache.reset();
        }
        mLoaded.set(false);
    }

    public abstract void onReady();
@@ -808,6 +810,15 @@ public abstract class IccRecords extends Handler implements IccConstants {
    public void setVoiceCallForwardingFlag(int line, boolean enable, String number) {
    }

    /**
     * Indicates wether the ICC records have been loaded or not
     *
     * @return true if the records have been loaded, false otherwise.
     */
    public boolean isLoaded() {
        return mLoaded.get();
    }

    /**
     * Indicates wether SIM is in provisioned state or not.
     * Overridden only if SIM can be dynamically provisioned via OTA.
+2 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ public class IsimUiccRecords extends IccRecords implements IsimRecords {

        mRecordsRequested = false;
        mLockedRecordsReqReason = LOCKED_RECORDS_REQ_REASON_NONE;
        mLoaded.set(false);
    }

    private class EfIsimImpiLoaded implements IccRecords.IccRecordLoaded {
@@ -306,6 +307,7 @@ public class IsimUiccRecords extends IccRecords implements IsimRecords {
    @Override
    protected void onAllRecordsLoaded() {
       if (DBG) log("record load complete");
        mLoaded.set(true);
        mRecordsLoadedRegistrants.notifyRegistrants(new AsyncResult(null, null, null));
    }

+2 −0
Original line number Diff line number Diff line
@@ -157,6 +157,7 @@ public class RuimRecords extends IccRecords {
        // true only when fresh set of read requests are made.
        mRecordsRequested = false;
        mLockedRecordsReqReason = LOCKED_RECORDS_REQ_REASON_NONE;
        mLoaded.set(false);
    }

    public String getMdnNumber() {
@@ -807,6 +808,7 @@ public class RuimRecords extends IccRecords {
            setSimLanguage(mEFli, mEFpl);
        }

        mLoaded.set(true);
        mRecordsLoadedRegistrants.notifyRegistrants(new AsyncResult(null, null, null));

        // TODO: The below is hacky since the SubscriptionController may not be ready at this time.
+2 −1
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ public class SIMRecords extends IccRecords {
        // true only when fresh set of read requests are made.
        mRecordsRequested = false;
        mLockedRecordsReqReason = LOCKED_RECORDS_REQ_REASON_NONE;
        mLoaded.set(false);
    }

    //***** Public Methods
@@ -1600,7 +1601,7 @@ public class SIMRecords extends IccRecords {
        }

        setVoiceMailByCountry(operator);

        mLoaded.set(true);
        mRecordsLoadedRegistrants.notifyRegistrants(new AsyncResult(null, null, null));
    }

Loading