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

Unverified Commit 582ed2b2 authored by LuK1337's avatar LuK1337
Browse files

fixup! ScreenOffAnimation: Fix system animation disable check

We need to pass the default value, otherwise we end up throwing
SettingNotFoundException.

Change-Id: I87402ef108b32fc9453b8bc9fce5bc28a4ec774d
parent 278b7c9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ class UnlockedScreenOffAnimationController @Inject constructor(

        // If animations are disabled system-wide, don't play this one either.
        if (Settings.Global.getFloat(
                context.contentResolver, Settings.Global.ANIMATOR_DURATION_SCALE) == 0f) {
                context.contentResolver, Settings.Global.ANIMATOR_DURATION_SCALE, 1f) == 0f) {
            return false
        }

+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ constructor(
    private fun shouldStartAnimation(): Boolean =
        alwaysOnEnabled &&
            wakefulnessLifecycle.lastSleepReason == PowerManager.GO_TO_SLEEP_REASON_DEVICE_FOLD &&
            globalSettings.getFloat(Settings.Global.ANIMATOR_DURATION_SCALE) != 0f
            globalSettings.getFloat(Settings.Global.ANIMATOR_DURATION_SCALE, 1f) != 0f

    override fun startAnimation(): Boolean =
        if (shouldStartAnimation()) {