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

Commit 39b44844 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Use AUTH_SCRIMMED_SHADE if transitioning to shade

Since the end scrim state should be SHADE, we want
to make sure the notification scrim doesn't
suddenly become transparent.

Test: atest SystemUITests
Test: manually test with sensitive notifications
not allowed to show on LS, pull down notification
shade with UDFPS enrolled
Fixes: 213158348

Change-Id: I367e5769edd82f9f5651d7522bdbfacbe7967786
parent 91d57819
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ class LockscreenShadeTransitionController @Inject constructor(
    wakefulnessLifecycle: WakefulnessLifecycle,
    configurationController: ConfigurationController,
    falsingManager: FalsingManager,
    dumpManager: DumpManager,
    dumpManager: DumpManager
) : Dumpable {
    private var pulseHeight: Float = 0f
    private var useSplitShade: Boolean = false
@@ -363,6 +363,7 @@ class LockscreenShadeTransitionController @Inject constructor(
        notificationPanelController.setKeyguardOnlyContentAlpha(1.0f - scrimProgress)
        depthController.transitionToFullShadeProgress = scrimProgress
        udfpsKeyguardViewController?.setTransitionToFullShadeProgress(scrimProgress)
        statusbar.setTransitionToFullShadeProgress(scrimProgress)
    }

    private fun setDragDownAmountAnimated(
+12 −1
Original line number Diff line number Diff line
@@ -343,6 +343,7 @@ public class StatusBar extends CoreStartable implements
    private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
    private final DreamOverlayStateController mDreamOverlayStateController;
    private StatusBarCommandQueueCallbacks mCommandQueueCallbacks;
    private float mTransitionToFullShadeProgress = 0f;

    void onStatusBarWindowStateChanged(@WindowVisibleState int state) {
        updateBubblesVisibility();
@@ -3774,6 +3775,15 @@ public class StatusBar extends CoreStartable implements
        updateScrimController();
    }

    /**
     * Set the amount of progress we are currently in if we're transitioning to the full shade.
     * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full
     * shade.
     */
    public void setTransitionToFullShadeProgress(float transitionToFullShadeProgress) {
        mTransitionToFullShadeProgress = transitionToFullShadeProgress;
    }

    @VisibleForTesting
    public void updateScrimController() {
        Trace.beginSection("StatusBar#updateScrimController");
@@ -3792,7 +3802,8 @@ public class StatusBar extends CoreStartable implements
        mScrimController.setLaunchingAffordanceWithPreview(launchingAffordanceWithPreview);

        if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) {
            if (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED) {
            if (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED
                    || mTransitionToFullShadeProgress > 0f) {
                mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED_SHADE);
            } else {
                mScrimController.transitionTo(ScrimState.AUTH_SCRIMMED);