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

Commit 1d35b3cd authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Revert "Apply front scrim to doze pulsing""

parents cbd736e2 463a52d5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -503,8 +503,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
     * device is dozing when the light sensor is on.
     */
    public void setAodFrontScrimAlpha(float alpha) {
        if (((mState == ScrimState.AOD && mDozeParameters.getAlwaysOn())
                || mState == ScrimState.PULSING) && mInFrontAlpha != alpha) {
        if (mState == ScrimState.AOD && mDozeParameters.getAlwaysOn()
                && mInFrontAlpha != alpha) {
            mInFrontAlpha = alpha;
            updateScrims();
        }
+2 −13
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ public class ScrimControllerTest extends SysuiTestCase {
    }

    @Test
    public void transitionToPulsing_withFrontAlphaUpdates() {
    public void transitionToPulsing() {
        // Pre-condition
        // Need to go to AoD first because PULSING doesn't change
        // the back scrim opacity - otherwise it would hide AoD wallpapers.
@@ -267,22 +267,11 @@ public class ScrimControllerTest extends SysuiTestCase {
                true /* behind */,
                false /* bubble */);

        // ... and when ambient goes dark, front scrim should be semi-transparent
        mScrimController.setAodFrontScrimAlpha(0.5f);
        mScrimController.finishAnimationsImmediately();
        // Front scrim should be semi-transparent
        assertScrimAlpha(SEMI_TRANSPARENT /* front */,
                OPAQUE /* back */,
                TRANSPARENT /* bubble */);

        mScrimController.setWakeLockScreenSensorActive(true);
        mScrimController.finishAnimationsImmediately();
        assertScrimAlpha(SEMI_TRANSPARENT /* front */,
        assertScrimAlpha(TRANSPARENT /* front */,
                SEMI_TRANSPARENT /* back */,
                TRANSPARENT /* bubble */);

        // Reset value since enums are static.
        mScrimController.setAodFrontScrimAlpha(0f);
    }

    @Test