diff options
| author | 2024-10-09 14:53:50 -0400 | |
|---|---|---|
| committer | 2024-10-09 18:59:31 +0000 | |
| commit | 655874ff0d41b7308ae3d62cf5e096730ca28e4c (patch) | |
| tree | 18c9d9a8e719aacdf6ef59c02f22dde348916de8 | |
| parent | dc9afc230b00767a9f75e05f2ab42e5e1c52f2de (diff) | |
Ignore dismiss requests if we're already going away.
These requests can come in if the activity we're unlocking to calls dismissKeyguard in onCreate/onResume. Activities that expect to sometimes launch over the lockscreen may do this (such as NewsActivity from Assistant). This should be a no-op, since we're already dismissing, but this was resulting in some activity launch animation state being set and never cleared, ending up on a black screen.
Test: manual with app that dismisses onResume
Fixes: 361832875
Flag: EXEMPT bugfix
Change-Id: Ibfc23643fe03a0f98fc69b2dea37e612b82d89ce
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 9c7cc81c34aa..f317c7b49f22 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -2456,6 +2456,12 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,              android.util.Log.i(TAG, "Ignoring request to dismiss (user switch in progress?)");              return;          } + +        if (mKeyguardStateController.isKeyguardGoingAway()) { +            Log.i(TAG, "Ignoring dismiss because we're already going away."); +            return; +        } +          mHandler.obtainMessage(DISMISS, new DismissMessage(callback, message)).sendToTarget();      } |