Merge "Make sure scrims will fade from black" into qt-r1-dev
am: bae4081329
Change-Id: Ia038c298cde47638df9a965d900c7ae4cf1a8af3
This commit is contained in:
@@ -491,8 +491,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
|
||||
* away once the display turns on.
|
||||
*/
|
||||
public void prepareForGentleWakeUp() {
|
||||
if (mState == ScrimState.AOD && mDozeParameters.getAlwaysOn()) {
|
||||
if (mState == ScrimState.AOD) {
|
||||
mCurrentInFrontAlpha = 1f;
|
||||
mCurrentInFrontTint = Color.BLACK;
|
||||
mCurrentBehindTint = Color.BLACK;
|
||||
mAnimateChange = false;
|
||||
updateScrims();
|
||||
mAnimateChange = true;
|
||||
|
||||
@@ -129,7 +129,10 @@ public enum ScrimState {
|
||||
public void prepare(ScrimState previousState) {
|
||||
mCurrentInFrontAlpha = 0f;
|
||||
mCurrentBehindTint = Color.BLACK;
|
||||
mCurrentInFrontTint = Color.BLACK;
|
||||
mBlankScreen = mDisplayRequiresBlanking;
|
||||
mAnimationDuration = mWakeLockScreenSensorActive
|
||||
? ScrimController.ANIMATION_DURATION_LONG : ScrimController.ANIMATION_DURATION;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -225,11 +225,12 @@ public class ScrimControllerTest extends SysuiTestCase {
|
||||
|
||||
mScrimController.transitionTo(ScrimState.PULSING);
|
||||
mScrimController.finishAnimationsImmediately();
|
||||
// Front scrim should be transparent
|
||||
// Front scrim should be transparent, but tinted
|
||||
// Back scrim should be semi-transparent so the user can see the wallpaper
|
||||
// Pulse callback should have been invoked
|
||||
assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_FULLY_OPAQUE);
|
||||
assertScrimTint(mScrimBehind, true /* tinted */);
|
||||
assertScrimTint(mScrimInFront, true /* tinted */);
|
||||
|
||||
mScrimController.setWakeLockScreenSensorActive(true);
|
||||
mScrimController.finishAnimationsImmediately();
|
||||
|
||||
Reference in New Issue
Block a user