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

Commit 3b8d6082 authored by Matt Pietal's avatar Matt Pietal
Browse files

SIM PIN unlock - Keyguard in invalid state

It is possible to get SIM events out of order, due to
KeyguardSIMPINController proactively settings the SIM state to
READY. We may also get a callback from the Telephony
SubscriptionManager notifying us of a state change, which can make the
Keyguard think the SIM state is LOCKED. If this happens fast enough,
we will show the SIM PIN screen twice, and the keyguard gets the state
confused due to the new unlock animation delaying the state change.

Bug: 191927891
Test: manual, enter SIM and unlock many times
Change-Id: Ib27a199d3cdd8a22af27ee74a147a89fa72281ac
parent 38f16f29
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1506,8 +1506,10 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
            return;
        }

        // if the keyguard is already showing, don't bother
        if (mKeyguardViewControllerLazy.get().isShowing()) {
        // if the keyguard is already showing, don't bother. check flags in both files
        // to account for the hiding animation which results in a delay and discrepancy
        // between flags
        if (mShowing && mKeyguardViewControllerLazy.get().isShowing()) {
            if (DEBUG) Log.d(TAG, "doKeyguard: not showing because it is already showing");
            resetStateLocked();
            return;