File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
app/src/main/java/com/duckduckgo/app/global/view Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ import android.animation.Animator
2020import android.animation.ValueAnimator
2121import android.content.Context
2222import android.os.Bundle
23+ import android.provider.Settings
24+ import android.provider.Settings.Global.ANIMATOR_DURATION_SCALE
2325import androidx.core.content.ContextCompat
2426import androidx.core.view.doOnDetach
2527import androidx.core.view.isVisible
@@ -140,7 +142,12 @@ class FireDialog(
140142 }
141143 }
142144
143- private fun animationEnabled () = settingsDataStore.fireAnimationEnabled
145+ private fun animationEnabled () = settingsDataStore.fireAnimationEnabled && animatorDurationEnabled()
146+
147+ private fun animatorDurationEnabled (): Boolean {
148+ val animatorScale = Settings .Global .getFloat(context.contentResolver, ANIMATOR_DURATION_SCALE , 0.0f )
149+ return animatorScale != 0.0f
150+ }
144151
145152 private fun playAnimation () {
146153 window?.navigationBarColor = ContextCompat .getColor(context, R .color.black)
You can’t perform that action at this time.
0 commit comments