From cdccd2d6719f1eac7585203510afdb37648acbe8 Mon Sep 17 00:00:00 2001 From: Alex Stetson Date: Thu, 21 Sep 2023 16:17:55 -0700 Subject: Always notify of keyguard exit animation When certain events, such as configuration changes, trigger between keyguardGoingAway and setKeyguardShown, the starting the pending exit animation will be cancelled and will notify the system of such an occurance here. However, SystemUI never gets notified because applying any occlusion state change returns early. Therefore, it is necessary to always notify to start the animation to prevent an unrecoverable inconsistent state. Bug: 272274722 Test: manual Change-Id: If1823781262a26d5bd2cfa8b86909e4f9892a717 --- .../core/java/com/android/server/policy/PhoneWindowManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index ca647929c271..0a002da14e70 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -3740,15 +3740,15 @@ public class PhoneWindowManager implements WindowManagerPolicy { */ private int handleTransitionForKeyguardLw(boolean startKeyguardExitAnimation, boolean notifyOccluded) { + int redoLayout = 0; if (notifyOccluded) { - final int redoLayout = applyKeyguardOcclusionChange(); - if (redoLayout != 0) return redoLayout; + redoLayout = applyKeyguardOcclusionChange(); } if (startKeyguardExitAnimation) { if (DEBUG_KEYGUARD) Slog.d(TAG, "Starting keyguard exit animation"); startKeyguardExitAnimation(SystemClock.uptimeMillis()); } - return 0; + return redoLayout; } // There are several different flavors of "assistant" that can be launched from -- cgit v1.2.3-59-g8ed1b