From b4b46a84694477e99cf478f4fdd8ee15055d85c6 Mon Sep 17 00:00:00 2001 From: Beverly Date: Wed, 10 Nov 2021 14:00:57 -0500 Subject: [PATCH] Re-prioritize keyguard visibility animation logic If the unlock animation should run, we should run it to make sure that the device's state actually updates to KEYGUARD when running the unlock animation. Test: manual Bug: 205587594 Change-Id: I50a948f3bb199f52d81dbd6066a603bea67a16bc --- .../android/keyguard/KeyguardVisibilityHelper.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java b/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java index e115c342c4fee..b77db8f97ccb6 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardVisibilityHelper.java @@ -121,6 +121,13 @@ public class KeyguardVisibilityHelper { .setStartDelay(delay); } animator.start(); + } else if (mUnlockedScreenOffAnimationController.shouldAnimateInKeyguard()) { + mKeyguardViewVisibilityAnimating = true; + + // Ask the screen off animation controller to animate the keyguard visibility for us + // since it may need to be cancelled due to keyguard lifecycle events. + mUnlockedScreenOffAnimationController.animateInKeyguard( + mView, mAnimateKeyguardStatusViewVisibleEndRunnable); } else if (mLastOccludedState && !isOccluded) { // An activity was displayed over the lock screen, and has now gone away mView.setVisibility(View.VISIBLE); @@ -132,13 +139,6 @@ public class KeyguardVisibilityHelper { .alpha(1f) .withEndAction(mAnimateKeyguardStatusViewVisibleEndRunnable) .start(); - } else if (mUnlockedScreenOffAnimationController.shouldAnimateInKeyguard()) { - mKeyguardViewVisibilityAnimating = true; - - // Ask the screen off animation controller to animate the keyguard visibility for us - // since it may need to be cancelled due to keyguard lifecycle events. - mUnlockedScreenOffAnimationController.animateInKeyguard( - mView, mAnimateKeyguardStatusViewVisibleEndRunnable); } else { mView.setVisibility(View.VISIBLE); mView.setAlpha(1f);