From 865e2df12e080174639616f67ca672c8b5fb0237 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Thu, 18 Apr 2024 15:24:12 -0400 Subject: Notify keyguardGoingAway prior to making the call. This is the ordering used in the keyguardGoingAwayRunnable, but we had it swapped for showSurfaceBehindKeyguard (which is used during swipe to unlock). ag/25832421 enforced that prepareForUnlock() must be called prior to Launcher's onStart(), and onStart() is triggered by keyguardGoingAway. This resulted in prepareForUnlock() having no effect, and the animation not running. This should be safe since all other unlock flows already use a code path that notifies goingAway=true prior to the actual call. Fixes: 334046148 Test: swipe to unlock Flag: NA Change-Id: Iaffdd6a45db5c03dc3f137b3dab6e209d3a57c52 (cherry picked from commit 93f49b79c890e0a7716c62af65437e23c6563de3) --- .../src/com/android/systemui/keyguard/KeyguardViewMediator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 6d917bbde82b..9349227bb474 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -179,6 +179,8 @@ import com.android.wm.shell.keyguard.KeyguardTransitions; import dagger.Lazy; +import kotlinx.coroutines.CoroutineDispatcher; + import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -188,8 +190,6 @@ import java.util.Objects; import java.util.concurrent.Executor; import java.util.function.Consumer; -import kotlinx.coroutines.CoroutineDispatcher; - /** * Mediates requests related to the keyguard. This includes queries about the * state of the keyguard, power management events that effect whether the keyguard @@ -3327,12 +3327,12 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, flags |= KEYGUARD_GOING_AWAY_FLAG_TO_LAUNCHER_CLEAR_SNAPSHOT; } + mKeyguardStateController.notifyKeyguardGoingAway(true); + if (!KeyguardWmStateRefactor.isEnabled()) { // Handled in WmLockscreenVisibilityManager. mActivityTaskManagerService.keyguardGoingAway(flags); } - - mKeyguardStateController.notifyKeyguardGoingAway(true); } catch (RemoteException e) { mSurfaceBehindRemoteAnimationRequested = false; e.printStackTrace(); -- cgit v1.2.3-59-g8ed1b