Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a2bc672 authored by Josh Tsuji's avatar Josh Tsuji Committed by Automerger Merge Worker
Browse files

Merge "Don't call updateIsKeyguard from the...

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

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

Change-Id: I3541b0e4a9c8c1d8847b6e41c2d66f5bd0475ce9
parents 3e671081 32a5017e
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -149,15 +149,19 @@ class UnlockedScreenOffAnimationController @Inject constructor(
        lightRevealAnimationPlaying = false
        aodUiAnimationPlaying = false

        // Make sure the status bar is in the correct keyguard state, forcing it if necessary. This
        // is required if the screen off animation is cancelled, since it might be incorrectly left
        // in the KEYGUARD or SHADE states depending on when it was cancelled 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.
        // If we can't control the screen off animation, we shouldn't mess with the StatusBar's
        // keyguard state unnecessarily.
        if (dozeParameters.get().canControlUnlockedScreenOff()) {
            // Make sure the status bar is in the correct keyguard state, forcing it if necessary.
            // This is required if the screen off animation is cancelled, since it might be
            // incorrectly left in the KEYGUARD or SHADE states depending on when it was cancelled
            // 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 */)
        }
    }

    override fun onStartedGoingToSleep() {
        if (dozeParameters.get().shouldControlUnlockedScreenOff()) {