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

Commit 463a52d5 authored by Chris.CC Lee's avatar Chris.CC Lee
Browse files

Revert "Apply front scrim to doze pulsing"

This reverts commit 84d6b0bf.

Reason for revert: This change does not cover state switching between AOD and PULSING.

Change-Id: I06b7375f57dd9035269563d9ae1476b8fc8f86f4
parent 84d6b0bf
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