Merge "Blank screen when coming from pulse" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
842ec5085b
@@ -148,7 +148,7 @@ public enum ScrimState {
|
||||
mCurrentInFrontAlpha = 0;
|
||||
mAnimationDuration = StatusBar.FADE_KEYGUARD_DURATION;
|
||||
|
||||
if (previousState == ScrimState.AOD) {
|
||||
if (previousState == ScrimState.AOD || previousState == ScrimState.PULSING) {
|
||||
// Fade from black to transparent when coming directly from AOD
|
||||
updateScrimColor(mScrimInFront, 1, Color.BLACK);
|
||||
updateScrimColor(mScrimBehind, 1, Color.BLACK);
|
||||
|
||||
@@ -350,6 +350,23 @@ public class ScrimControllerTest extends SysuiTestCase {
|
||||
mScrimController.finishAnimationsImmediately();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void scrimBlanksWhenUnlockingFromPulse() {
|
||||
boolean[] blanked = {false};
|
||||
// Simulate unlock with fingerprint
|
||||
mScrimController.transitionTo(ScrimState.PULSING);
|
||||
mScrimController.finishAnimationsImmediately();
|
||||
mScrimController.transitionTo(ScrimState.UNLOCKED,
|
||||
new ScrimController.Callback() {
|
||||
@Override
|
||||
public void onDisplayBlanked() {
|
||||
blanked[0] = true;
|
||||
}
|
||||
});
|
||||
mScrimController.finishAnimationsImmediately();
|
||||
Assert.assertTrue("Scrim should blank when unlocking from pulse.", blanked[0]);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testScrimCallback() {
|
||||
int[] callOrder = {0, 0, 0};
|
||||
|
||||
Reference in New Issue
Block a user