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

Commit b31fe612 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Don't play the screen off animation if we disabled animations system-wide.

This setting works by setting animator durations to zero, but the screen off animation is way too complicated for that to work well.

Fixes: 202086856
Test: screen off with and without animations enabled in a11y settings
Change-Id: I13e9ef2f33a3fd29ac189123e7398277111ada5a
parent 95945d9a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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