Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d68a97d authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "Blank screen when coming from pulse" into pi-dev

am: 842ec508

Change-Id: Iac099da89693788cab0da36f5feecf66fd92ecef
parents 55321dbd 842ec508
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+17 −0
Original line number Diff line number Diff line
@@ -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};