From 655874ff0d41b7308ae3d62cf5e096730ca28e4c Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Wed, 9 Oct 2024 14:53:50 -0400 Subject: 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 --- .../src/com/android/systemui/keyguard/KeyguardViewMediator.java | 6 ++++++ 1 file changed, 6 insertions(+) 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(); } -- cgit v1.2.3-59-g8ed1b