Add default values to global duration scale resolution.
This commit is contained in:
parent
2b10f93718
commit
47f1d3f594
1 changed files with 2 additions and 2 deletions
|
@ -9,8 +9,8 @@ fun ContentResolver.areSystemAnimationsDisabled(): Boolean {
|
||||||
return if (Build.VERSION.SDK_INT >= 26) {
|
return if (Build.VERSION.SDK_INT >= 26) {
|
||||||
!ValueAnimator.areAnimatorsEnabled()
|
!ValueAnimator.areAnimatorsEnabled()
|
||||||
} else {
|
} else {
|
||||||
val durationScale = Settings.System.getFloat(this, Settings.Global.ANIMATOR_DURATION_SCALE)
|
val durationScale = Settings.Global.getFloat(this, Settings.Global.ANIMATOR_DURATION_SCALE, 1.0f)
|
||||||
val transitionScale = Settings.System.getFloat(this, Settings.Global.TRANSITION_ANIMATION_SCALE)
|
val transitionScale = Settings.Global.getFloat(this, Settings.Global.TRANSITION_ANIMATION_SCALE, 1.0f)
|
||||||
|
|
||||||
!(durationScale > 0f && transitionScale > 0f)
|
!(durationScale > 0f && transitionScale > 0f)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue