Add default values to global duration scale resolution.

This commit is contained in:
Alex Hart authored and Greyson Parrelli committed 2022-11-11 13:14:20 -05:00
1 parent 844480786e
commit 8cd0184962
1 file changed
+2 -2
@@ -9,8 +9,8 @@ fun ContentResolver.areSystemAnimationsDisabled(): Boolean {
return if (Build.VERSION.SDK_INT >= 26) {
!ValueAnimator.areAnimatorsEnabled()
} else {
val durationScale = Settings.System.getFloat(this, Settings.Global.ANIMATOR_DURATION_SCALE)
val transitionScale = Settings.System.getFloat(this, Settings.Global.TRANSITION_ANIMATION_SCALE)
val durationScale = Settings.Global.getFloat(this, Settings.Global.ANIMATOR_DURATION_SCALE, 1.0f)
val transitionScale = Settings.Global.getFloat(this, Settings.Global.TRANSITION_ANIMATION_SCALE, 1.0f)
!(durationScale > 0f && transitionScale > 0f)
}