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

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

Merge "Keep QS black during auth" into tm-dev

parents 017c695c f56f1278
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -767,6 +767,10 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump

            mBehindAlpha = behindFraction * mDefaultScrimAlpha;
            mNotificationsAlpha = mBehindAlpha;
            if (mClipsQsScrim) {
                mBehindAlpha = 1;
                mBehindTint = Color.BLACK;
            }
        } else if (mState == ScrimState.KEYGUARD || mState == ScrimState.SHADE_LOCKED
                || mState == ScrimState.PULSING) {
            Pair<Integer, Float> result = calculateBackStateForState(mState);
+7 −0
Original line number Diff line number Diff line
@@ -1107,6 +1107,7 @@ public class ScrimControllerTest extends SysuiTestCase {
        // GIVEN device has an activity showing ('UNLOCKED' state can occur on the lock screen
        // with the camera app occluding the keyguard)
        mScrimController.transitionTo(ScrimState.UNLOCKED);
        mScrimController.setClipsQsScrim(true);
        mScrimController.setRawPanelExpansionFraction(1);
        // notifications scrim alpha change require calling setQsPosition
        mScrimController.setQsPosition(0, 300);
@@ -1120,6 +1121,12 @@ public class ScrimControllerTest extends SysuiTestCase {
                mScrimBehind.getViewAlpha(), 1, 0.0);
        assertEquals("Notifications scrim should be opaque",
                mNotificationsScrim.getViewAlpha(), 1, 0.0);

        assertScrimTinted(Map.of(
                mScrimInFront, true,
                mScrimBehind, true,
                mNotificationsScrim, false
        ));
    }

    @Test