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

Commit 960ba913 authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "CDMALTE: Start reading SIM record on SIM_READY"

parents b5305007 ef5acbc0
Loading
Loading
Loading
Loading
+2 −18
Original line number Diff line number Diff line
@@ -470,19 +470,6 @@ public abstract class IccCard {
        } else if (isIccCardAdded) {
            mHandler.sendMessage(mHandler.obtainMessage(EVENT_CARD_ADDED, null));
        }



        /*
         * TODO: We need to try to remove this, maybe if the RIL sends up a RIL_UNSOL_SIM_REFRESH?
         */
        if (oldState != State.READY && newState == State.READY &&
                mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
            if (mPhone.mIccRecords instanceof SIMRecords) {
                ((SIMRecords)mPhone.mIccRecords).onSimReady();
            }
        }

    }

    private void onIccSwap(boolean isAdded) {
@@ -720,17 +707,14 @@ public abstract class IccCard {
            currentRadioState == RadioState.SIM_NOT_READY     ||
            currentRadioState == RadioState.RUIM_NOT_READY    ||
            currentRadioState == RadioState.NV_NOT_READY      ||
            (currentRadioState == RadioState.NV_READY &&
                    (mPhone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE))) {
            currentRadioState == RadioState.NV_READY) {
            return IccCard.State.NOT_READY;
        }

        if( currentRadioState == RadioState.SIM_LOCKED_OR_ABSENT  ||
            currentRadioState == RadioState.SIM_READY             ||
            currentRadioState == RadioState.RUIM_LOCKED_OR_ABSENT ||
            currentRadioState == RadioState.RUIM_READY ||
            (currentRadioState == RadioState.NV_READY &&
                    (mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE))) {
            currentRadioState == RadioState.RUIM_READY) {

            State csimState =
                getAppState(mIccCardStatus.getCdmaSubscriptionAppIndex());
+2 −8
Original line number Diff line number Diff line
@@ -181,11 +181,7 @@ public class SIMRecords extends IccRecords {
        // recordsToLoad is set to 0 because no requests are made yet
        recordsToLoad = 0;

        // SIMRecord is used by CDMA+LTE mode, and SIM_READY event
        // will be subscribed by CdmaLteServiceStateTracker.
        if (phone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE) {
        p.mCM.registerForSIMReady(this, EVENT_SIM_READY, null);
        }
        p.mCM.registerForOffOrNotAvailable(
                        this, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, null);
        p.mCM.setOnSmsOnSim(this, EVENT_SMS_ON_SIM, null);
@@ -199,9 +195,7 @@ public class SIMRecords extends IccRecords {
    @Override
    public void dispose() {
        //Unregister for all events
        if (phone.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE) {
        phone.mCM.unregisterForSIMReady(this);
        }
        phone.mCM.unregisterForOffOrNotAvailable( this);
        phone.mCM.unregisterForIccRefresh(this);
    }
+0 −2
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ public final class SimCard extends IccCard {
        updateStateProperty();

        if(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
            mPhone.mCM.registerForNVReady(mHandler, EVENT_ICC_READY, null);
            mPhone.mCM.registerForIccStatusChanged(mHandler, EVENT_ICC_LOCKED_OR_ABSENT, null);
        }
    }
@@ -63,7 +62,6 @@ public final class SimCard extends IccCard {
        mPhone.mCM.unregisterForSIMReady(mHandler);

        if(mPhone.getLteOnCdmaMode() == Phone.LTE_ON_CDMA_TRUE) {
            mPhone.mCM.unregisterForNVReady(mHandler);
            mPhone.mCM.unregisterForIccStatusChanged(mHandler);
        }
    }