Fade scrims slower when entering AOD

Test: visual
Change-Id: I32117a6351c3d652f845b1b46bffaade52f1fbc4
Fixes: 77539750
This commit is contained in:
Lucas Dupin
2018-04-04 15:09:06 -07:00
parent a926126a8b
commit 4749f1b9e0
2 changed files with 8 additions and 1 deletions

View File

@@ -68,8 +68,14 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
private static final String TAG = "ScrimController";
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
/**
* General scrim animation duration.
*/
public static final long ANIMATION_DURATION = 220;
/**
* Longer duration, currently only used when going to AOD.
*/
public static final long ANIMATION_DURATION_LONG = 1000;
/**
* When both scrims have 0 alpha.
*/

View File

@@ -111,6 +111,7 @@ public enum ScrimState {
mCurrentInFrontAlpha = alwaysOnEnabled ? mAodFrontScrimAlpha : 1f;
mCurrentInFrontTint = Color.BLACK;
mCurrentBehindTint = Color.BLACK;
mAnimationDuration = ScrimController.ANIMATION_DURATION_LONG;
// DisplayPowerManager will blank the screen for us, we just need
// to set our state.
mAnimateChange = !mDisplayRequiresBlanking;