Merge "Darker scrim when pulsing"
This commit is contained in:
committed by
Android (Google) Code Review
commit
ab4a65e72e
@@ -89,6 +89,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
|
||||
* Default alpha value for most scrims.
|
||||
*/
|
||||
public static final float GRADIENT_SCRIM_ALPHA = 0.2f;
|
||||
/**
|
||||
* Scrim opacity when the phone is about to wake-up.
|
||||
*/
|
||||
public static final float AOD2_SCRIM_ALPHA = 0.6f;
|
||||
/**
|
||||
* A scrim varies its opacity based on a busyness factor, for example
|
||||
* how many notifications are currently visible.
|
||||
|
||||
@@ -133,11 +133,10 @@ public enum ScrimState {
|
||||
|| mPulseReason == DozeLog.PULSE_REASON_DOCKING
|
||||
|| mPulseReason == DozeLog.PULSE_REASON_INTENT) {
|
||||
mCurrentBehindAlpha = previousState.getBehindAlpha();
|
||||
mCurrentBehindTint = Color.BLACK;
|
||||
} else {
|
||||
mCurrentBehindAlpha = mScrimBehindAlphaKeyguard;
|
||||
mCurrentBehindTint = Color.TRANSPARENT;
|
||||
mCurrentBehindAlpha = ScrimController.AOD2_SCRIM_ALPHA;
|
||||
}
|
||||
mCurrentBehindTint = Color.BLACK;
|
||||
mBlankScreen = mDisplayRequiresBlanking;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -232,7 +232,7 @@ public class ScrimControllerTest extends SysuiTestCase {
|
||||
// Back scrim should be semi-transparent so the user can see the wallpaper
|
||||
// Pulse callback should have been invoked
|
||||
assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_SEMI_TRANSPARENT);
|
||||
assertScrimTint(mScrimBehind, false /* tinted */);
|
||||
assertScrimTint(mScrimBehind, true /* tinted */);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user