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

Commit 3113db67 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Darker scrim when pulsing

Bug: 111414690
Test: visual
Change-Id: I562037425b3d722a5832fca8814b9794f7df33f7
parent 5d424061
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -89,6 +89,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, OnCo
     * Default alpha value for most scrims.
     */
    public static final float GRADIENT_SCRIM_ALPHA = 0.2f;
    /**
     * Scrim opacity when the phone is about to wake-up.
     */
    public static final float AOD2_SCRIM_ALPHA = 0.6f;
    /**
     * A scrim varies its opacity based on a busyness factor, for example
     * how many notifications are currently visible.
+2 −3
Original line number Diff line number Diff line
@@ -133,11 +133,10 @@ public enum ScrimState {
                    || mPulseReason == DozeLog.PULSE_REASON_DOCKING
                    || mPulseReason == DozeLog.PULSE_REASON_INTENT) {
                mCurrentBehindAlpha = previousState.getBehindAlpha();
                mCurrentBehindTint = Color.BLACK;
            } else {
                mCurrentBehindAlpha = mScrimBehindAlphaKeyguard;
                mCurrentBehindTint = Color.TRANSPARENT;
                mCurrentBehindAlpha = ScrimController.AOD2_SCRIM_ALPHA;
            }
            mCurrentBehindTint = Color.BLACK;
            mBlankScreen = mDisplayRequiresBlanking;
        }
    },
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ public class ScrimControllerTest extends SysuiTestCase {
        // Back scrim should be semi-transparent so the user can see the wallpaper
        // Pulse callback should have been invoked
        assertScrimVisibility(VISIBILITY_FULLY_TRANSPARENT, VISIBILITY_SEMI_TRANSPARENT);
        assertScrimTint(mScrimBehind, false /* tinted */);
        assertScrimTint(mScrimBehind, true /* tinted */);
    }

    @Test