diff options
3 files changed, 18 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt index e51b60213446..2cc564bf8452 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt @@ -62,7 +62,7 @@ const val SURFACE_BEHIND_SCALE_PIVOT_Y = 0.66f * The dismiss amount is the inverse of the notification panel expansion, which decreases as the * lock screen is swiped away. */ -const val DISMISS_AMOUNT_SHOW_SURFACE_THRESHOLD = 0.1f +const val DISMISS_AMOUNT_SHOW_SURFACE_THRESHOLD = 0.25f /** * Dismiss amount at which to complete the keyguard exit animation and hide the keyguard. @@ -70,7 +70,7 @@ const val DISMISS_AMOUNT_SHOW_SURFACE_THRESHOLD = 0.1f * The dismiss amount is the inverse of the notification panel expansion, which decreases as the * lock screen is swiped away. */ -const val DISMISS_AMOUNT_EXIT_KEYGUARD_THRESHOLD = 0.3f +const val DISMISS_AMOUNT_EXIT_KEYGUARD_THRESHOLD = 0.4f /** * Initiates, controls, and ends the keyguard unlock animation. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index f1bc64b63afc..53def0110b62 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -4380,9 +4380,16 @@ public class NotificationPanelViewController extends PanelViewController { } } } else { - mKeyguardStatusBarViewController.updateViewState( - /* alpha= */ 1f, - keyguardShowing ? View.VISIBLE : View.INVISIBLE); + final boolean animatingUnlockedShadeToKeyguard = oldState == SHADE + && statusBarState == KEYGUARD + && mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying(); + if (!animatingUnlockedShadeToKeyguard) { + // Only make the status bar visible if we're not animating the screen off, since + // we only want to be showing the clock/notifications during the animation. + mKeyguardStatusBarViewController.updateViewState( + /* alpha= */ 1f, + keyguardShowing ? View.VISIBLE : View.INVISIBLE); + } if (keyguardShowing && oldState != mBarState) { if (mQs != null) { mQs.hideImmediately(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt index f3f3325f49d7..fdc0ec5b9089 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -226,6 +226,12 @@ class UnlockedScreenOffAnimationController @Inject constructor( return false } + // If animations are disabled system-wide, don't play this one either. + if (Settings.Global.getString( + context.contentResolver, Settings.Global.ANIMATOR_DURATION_SCALE) == "0") { + return false + } + // We only play the unlocked screen off animation if we are... unlocked. if (statusBarStateControllerImpl.state != StatusBarState.SHADE) { return false |