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

Commit 6ec76b72 authored by Adrian Roos's avatar Adrian Roos
Browse files

Keyguard: fix possible divergent state

Fixes an issue where the state in SystemUI and AM/WM could
get out of sync: If the keyguardGoingAway transition is
started and then later canceled by SystemUI, it never
tells AM that it canceled it.
This causes SystemUI to show itself in keyguard mode,
meanwhile AM/WM do not hide the underlying app because
the status bar is in the going away transition as far
as it is concerned.

Change-Id: I5966f0655fd694ae599a83dda7a9f6463088632b
Fixes: 76367931
Test: delay keyguard going away callback, unlock phone, during the delay, remove SIM; verify it does not end up in bad state
parent bbfe498a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1857,6 +1857,8 @@ public class KeyguardViewMediator extends SystemUI {
        synchronized (KeyguardViewMediator.this) {

            if (!mHiding) {
                // Tell ActivityManager that we canceled the keyguardExitAnimation.
                setShowingLocked(mShowing, mAodShowing, mSecondaryDisplayShowing, true /* force */);
                return;
            }
            mHiding = false;
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ class KeyguardController {
    void setKeyguardShown(boolean keyguardShowing, boolean aodShowing,
            int secondaryDisplayShowing) {
        boolean showingChanged = keyguardShowing != mKeyguardShowing || aodShowing != mAodShowing;
        // If keyguard is going away, but SystemUI aborted the transition, need to reset state.
        showingChanged |= mKeyguardGoingAway && keyguardShowing;
        if (!showingChanged && secondaryDisplayShowing == mSecondaryDisplayShowing) {
            return;
        }