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

Commit ab4a65e7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Darker scrim when pulsing"

parents b4db127f 3113db67
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