Merge "Don't call updateIsKeyguard from the UnlockedScreenOffAnimationController if we can't control the screen off animation." into sc-dev am: 5f51b92263

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15486170

Change-Id: I95b0133d537d89a6726a926a27c00862d78721a3
This commit is contained in:
Josh Tsuji
2021-08-09 19:41:17 +00:00
committed by Automerger Merge Worker

View File

@@ -149,15 +149,19 @@ class UnlockedScreenOffAnimationController @Inject constructor(
lightRevealAnimationPlaying = false lightRevealAnimationPlaying = false
aodUiAnimationPlaying = false aodUiAnimationPlaying = false
// Make sure the status bar is in the correct keyguard state, forcing it if necessary. This // If we can't control the screen off animation, we shouldn't mess with the StatusBar's
// is required if the screen off animation is cancelled, since it might be incorrectly left // keyguard state unnecessarily.
// in the KEYGUARD or SHADE states depending on when it was cancelled and whether 'lock if (dozeParameters.get().canControlUnlockedScreenOff()) {
// instantly' is enabled. We need to force it so that the state is set even if we're going // Make sure the status bar is in the correct keyguard state, forcing it if necessary.
// from SHADE to SHADE or KEYGUARD to KEYGUARD, since we might have changed parts of the UI // This is required if the screen off animation is cancelled, since it might be
// (such as showing AOD in the shade) without actually changing the StatusBarState. This // incorrectly left in the KEYGUARD or SHADE states depending on when it was cancelled
// ensures that the UI definitely reflects the desired state. // and whether 'lock instantly' is enabled. We need to force it so that the state is set
// even if we're going from SHADE to SHADE or KEYGUARD to KEYGUARD, since we might have
// changed parts of the UI (such as showing AOD in the shade) without actually changing
// the StatusBarState. This ensures that the UI definitely reflects the desired state.
statusBar.updateIsKeyguard(true /* force */) statusBar.updateIsKeyguard(true /* force */)
} }
}
override fun onStartedGoingToSleep() { override fun onStartedGoingToSleep() {
if (dozeParameters.get().shouldControlUnlockedScreenOff()) { if (dozeParameters.get().shouldControlUnlockedScreenOff()) {