From 63fa0d51ae814d60f04e9e7d032df0348d227d76 Mon Sep 17 00:00:00 2001 From: Nick Chameyev Date: Fri, 18 Feb 2022 11:58:58 +0000 Subject: [PATCH] [Fold to AOD] Respect screen off animation status in navbar when keyguard is showing Forces navigation bar to hide when fold to AOD animation is playing when keyguard is already displayed. This could happen when device is unfolded and already showing the lockscreen and we start folding it. Also adds a functional test that checks this behavior. Bug: 202844967 Test: phone is locked and showing keyguard, fold => check that navbar is not visible Test: atest android.platform.test.scenario.sysui.foldable.FoldToAod Change-Id: Ibef318a723b73e9c5a5c322380fff84ecbb3533e --- .../statusbar/phone/StatusBarKeyguardViewManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 11d9c311fb6c8..a96ba56be58d7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -1077,7 +1077,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb && mBiometricUnlockController.getMode() == MODE_WAKE_AND_UNLOCK_PULSING; boolean keyguardShowing = mShowing && !mOccluded; boolean hideWhileDozing = mDozing && !isWakeAndUnlockPulsing; - boolean keyguardWithGestureNav = (keyguardShowing && !mDozing || mPulsing && !mIsDocked) + boolean keyguardWithGestureNav = (keyguardShowing && !mDozing && !mScreenOffAnimationPlaying + || mPulsing && !mIsDocked) && mGesturalNav; return (!keyguardShowing && !hideWhileDozing && !mScreenOffAnimationPlaying || mBouncer.isShowing() || mRemoteInputActive || keyguardWithGestureNav @@ -1091,7 +1092,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb boolean keyguardShowing = mLastShowing && !mLastOccluded; boolean hideWhileDozing = mLastDozing && mLastBiometricMode != MODE_WAKE_AND_UNLOCK_PULSING; boolean keyguardWithGestureNav = (keyguardShowing && !mLastDozing - || mLastPulsing && !mLastIsDocked) && mLastGesturalNav; + && !mLastScreenOffAnimationPlaying || mLastPulsing && !mLastIsDocked) + && mLastGesturalNav; return (!keyguardShowing && !hideWhileDozing && !mLastScreenOffAnimationPlaying || mLastBouncerShowing || mLastRemoteInputActive || keyguardWithGestureNav || mLastGlobalActionsVisible);