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

Commit ed2f7cec authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "Send external state again after updating siminfo table""

parents bb989cd2 e17a0862
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -19,10 +19,8 @@ package com.android.internal.telephony.uicc;
import static android.Manifest.permission.READ_PHONE_STATE;

import android.app.ActivityManagerNative;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
@@ -129,19 +127,6 @@ public class IccCardProxy extends Handler implements IccCard {
    private boolean mIsCardStatusAvailable = false;
    private PersoSubState mPersoSubState = PersoSubState.PERSOSUBSTATE_UNKNOWN;

    // Sim State events may be broadcasted before the siminfo table update has been
    // completed. Due to this such events may be broadcasted with dummy subId for a
    // particular slotId. Therefore, setExternalState once the siminfo table has been updated.
    // For example, if the UI receives the sim state broadcast with the state as pin locked
    // with dummy subId, the pin lock screen will not be displayed.
    private BroadcastReceiver mReceiver = new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                if (TelephonyIntents.ACTION_SUBINFO_RECORD_UPDATED.equals(intent.getAction())) {
                    setExternalState(mExternalState, true);
                }
            }};

    public IccCardProxy(Context context, CommandsInterface ci) {
        log("Creating");
        mContext = context;
@@ -152,9 +137,6 @@ public class IccCardProxy extends Handler implements IccCard {
        mUiccController.registerForIccChanged(this, EVENT_ICC_CHANGED, null);
        ci.registerForOn(this,EVENT_RADIO_ON, null);
        ci.registerForOffOrNotAvailable(this, EVENT_RADIO_OFF_OR_UNAVAILABLE, null);
        IntentFilter filter =
                new IntentFilter(TelephonyIntents.ACTION_SUBINFO_RECORD_UPDATED);
        mContext.registerReceiver(mReceiver, filter);
        setExternalState(State.NOT_READY);
    }

@@ -170,7 +152,6 @@ public class IccCardProxy extends Handler implements IccCard {
    public void dispose() {
        synchronized (mLock) {
            log("Disposing");
            mContext.unregisterReceiver(mReceiver);
            //Cleanup icc references
            mUiccController.unregisterForIccChanged(this);
            mUiccController = null;