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

Commit 7ec73696 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

On keyguard unoccluding, set notif scrim alpha to KEYGUARD_SCRIM_ALPHA

We still want the keyguard notification scrim after
the unoccluding transition.

Test: manual, atest ScrimControllerTest
Bug: 197160246
Change-Id: I210ba3491eb98c30bec121c6119f6dfb1d6aeba7
parent 09ce8952
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -711,7 +711,8 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
            }
            if (mUnOcclusionAnimationRunning && mState == ScrimState.KEYGUARD) {
                // We're unoccluding the keyguard and don't want to have a bright flash.
                mNotificationsAlpha = 0f;
                mNotificationsAlpha = KEYGUARD_SCRIM_ALPHA;
                mNotificationsTint = ScrimState.KEYGUARD.getNotifTint();
            }
        }
        if (isNaN(mBehindAlpha) || isNaN(mInFrontAlpha) || isNaN(mNotificationsAlpha)) {
+5 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.statusbar.phone;

import static com.android.systemui.statusbar.phone.ScrimController.KEYGUARD_SCRIM_ALPHA;
import static com.android.systemui.statusbar.phone.ScrimController.OPAQUE;
import static com.android.systemui.statusbar.phone.ScrimController.SEMI_TRANSPARENT;
import static com.android.systemui.statusbar.phone.ScrimController.TRANSPARENT;
@@ -1142,8 +1143,10 @@ public class ScrimControllerTest extends SysuiTestCase {
        mScrimController.transitionTo(ScrimState.KEYGUARD);
        mScrimController.setUnocclusionAnimationRunning(true);

        assertAlphaAfterExpansion(mNotificationsScrim, /* alpha */ 0.0f, /* expansion */ 0.0f);
        assertAlphaAfterExpansion(mNotificationsScrim, /* alpha */ 0.0f, /* expansion */ 1.0f);
        assertAlphaAfterExpansion(mNotificationsScrim, /* alpha */ KEYGUARD_SCRIM_ALPHA,
                /* expansion */ 0.0f);
        assertAlphaAfterExpansion(mNotificationsScrim, /* alpha */ KEYGUARD_SCRIM_ALPHA,
                /* expansion */ 1.0f);

        // Verify normal behavior after
        mScrimController.setUnocclusionAnimationRunning(false);