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

Commit f56f1278 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Keep QS black during auth

Test: manual
Test: atest ScrimControllerTest
Fixes: 219803566
Change-Id: I2150a20c0e75d353657da06acf46319dd8d3b81e
parent 74807869
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -743,6 +743,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
@@ -1103,6 +1103,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);
@@ -1116,6 +1117,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