From bdee377f878580012db2a38a581e8aaa40a39759 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Mon, 6 Jul 2020 18:04:47 -0700 Subject: [PATCH] Don't delay frame scheduling Doing so will lead to state inconsistencies. setExpansionAffectsAlpha won't enque opacity requrests because mUpdatePending won't be true yet, causing sudden opacity changes. The much longer mAnimationDelay will already take care of waiting for a while before starting the scrim animation. Test: manual, with fp sensor Fixes: 158955776 Change-Id: I9f7342f01de36576ba0108edfecbfc97448c8756 (cherry picked from commit d38fed16c8248eac08d7961798c1dec1c5f7bc23) --- .../com/android/systemui/statusbar/phone/ScrimController.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index 60fc17d9474ab..686b87127239c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -348,10 +348,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo } if (mKeyguardUpdateMonitor.needsSlowUnlockTransition() && mState == ScrimState.UNLOCKED) { - // In case the user isn't unlocked, make sure to delay a bit because the system is hosed - // with too many things at this case, in order to not skip the initial frames. - mScrimInFront.postOnAnimationDelayed(this::scheduleUpdate, 16); mAnimationDelay = StatusBar.FADE_KEYGUARD_START_DELAY; + scheduleUpdate(); } else if ((!mDozeParameters.getAlwaysOn() && oldState == ScrimState.AOD) || (mState == ScrimState.AOD && !mDozeParameters.getDisplayNeedsBlanking())) { // Scheduling a frame isn't enough when: