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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user