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

Commit 7a7e2c9f authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Set opaque to false always when applyBlur() when shade blur flag is on

isAnyFullyExpanded is a reliable signal for whether the shade is fullscreen or not. Regardless, we don't need this signal once blur is on by default since opaque should always be false.

Flag: com.android.systemui.notification_shade_blur
Flag: com.android.systemui.bouncer_ui_revamp
Test: pressure test pulling the shade down and up
Fixes: 413143279
Fixes: 417555127
Change-Id: Iefeeeb3e97ec13675d9f6a81d4df78d5ea2c8ac5
parent e6661d7f
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -116,19 +116,7 @@ constructor(
     * composited with the alpha channels from the surfaces below while rendering.
     */
    val isSurfaceOpaque =
        combine(blurInteractor.isBlurCurrentlySupported, shadeInteractor.isAnyFullyExpanded) {
                blurSupported,
                anyShadeFullyExpanded ->
                if (blurSupported) {
                    // scrims will be opaque when shade is fully expanded
                    // Fall back to old behavior when shade blur is not enabled.
                    !Flags.notificationShadeBlur() && anyShadeFullyExpanded
                } else {
                    anyShadeFullyExpanded
                }
            }
            .distinctUntilChanged()
            .logIfPossible("isSurfaceOpaque")
        if (Flags.notificationShadeBlur()) flowOf(false) else shadeInteractor.isAnyFullyExpanded

    fun onBlurApplied(blurRadius: Int, isOpaque: Boolean) {
        if (isLoggable) {