From 1d426536b70a1f6f1020addc3457d14ae6c38433 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Mon, 13 Jun 2022 15:09:48 -0400 Subject: [PATCH] Close panel immediately on launch animation end Otherwise the activity will launch, then the window will quickly flip back to the fully expanded shade and make the user watch the collapse animation before finally showing the activity that was started. This path only occurs when the keyguard is unlocked, and triggers the remote occlude animation to run. Fixes: 234577570 Test: manual, use face unlock without bypass, unlock the lockscreen, then start an occluding activity (controls, maps) Change-Id: Ifcb59cce810c81e607d5fe83389d282100ef7236 --- .../systemui/keyguard/KeyguardViewMediator.java | 10 ++++++++++ .../systemui/statusbar/phone/CentralSurfacesImpl.java | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 80ad93fd84e7e..3ad43ac32185f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -485,6 +485,8 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, */ private IRemoteAnimationRunner mKeyguardExitAnimationRunner; + private CentralSurfaces mCentralSurfaces; + private final DeviceConfig.OnPropertiesChangedListener mOnPropertiesChangedListener = new DeviceConfig.OnPropertiesChangedListener() { @Override @@ -845,6 +847,13 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, + mOccluded); } + @Override + public void onLaunchAnimationEnd(boolean launchIsFullScreen) { + if (launchIsFullScreen) { + mCentralSurfaces.instantCollapseNotificationPanel(); + } + } + @NonNull @Override public ViewGroup getLaunchContainer() { @@ -2846,6 +2855,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, @Nullable PanelExpansionStateManager panelExpansionStateManager, BiometricUnlockController biometricUnlockController, View notificationContainer, KeyguardBypassController bypassController) { + mCentralSurfaces = centralSurfaces; mKeyguardViewControllerLazy.get().registerCentralSurfaces( centralSurfaces, panelView, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index 367684faa6215..705de9b43ed0c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -1596,7 +1596,7 @@ public class CentralSurfacesImpl extends CoreStartable implements } } }); - mStatusBarKeyguardViewManager.registerCentralSurfaces( + mKeyguardViewMediator.registerCentralSurfaces( /* statusBar= */ this, mNotificationPanelViewController, mPanelExpansionStateManager,