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

Commit 4ad4b810 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Hide SIM PIN when SIM card is removed"

parents c4426c81 2e0d4959
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1904,14 +1904,19 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
                    + slotId + ", state=" + state +")");
        }

        boolean becameAbsent = false;
        if (!SubscriptionManager.isValidSubscriptionId(subId)) {
            Log.w(TAG, "invalid subId in handleSimStateChange()");
            /* Only handle No SIM(ABSENT) due to handleServiceStateChange() handle other case */
            if (state == State.ABSENT) {
                updateTelephonyCapable(true);
            }
                // Even though the subscription is not valid anymore, we need to notify that the
                // SIM card was removed so we can update the UI.
                becameAbsent = true;
            } else {
                return;
            }
        }

        SimData data = mSimDatas.get(subId);
        final boolean changed;
@@ -1925,7 +1930,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
            data.subId = subId;
            data.slotId = slotId;
        }
        if (changed && state != State.UNKNOWN) {
        if ((changed || becameAbsent) && state != State.UNKNOWN) {
            for (int i = 0; i < mCallbacks.size(); i++) {
                KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
                if (cb != null) {
+3 −0
Original line number Diff line number Diff line
@@ -488,6 +488,9 @@ public class KeyguardViewMediator extends SystemUI {
                            // MVNO SIMs can become transiently NOT_READY when switching networks,
                            // so we should only lock when they are ABSENT.
                            onSimAbsentLocked();
                            if (simWasLocked) {
                                resetStateLocked();
                            }
                        }
                    }
                    break;