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

Commit 6ef60da6 authored by Ioana Alexandru's avatar Ioana Alexandru Committed by Android (Google) Code Review
Browse files

Merge "Fix footer flashing on screen when HUN is dismissed" into main

parents 049df0d7 7b3070e5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -80,6 +80,16 @@ flag {
    bug: "294347738"
}

flag {
    name: "notifications_footer_visibility_fix"
    namespace: "systemui"
    description: "Fixes a bug where the footer would briefly appear when dismissing a HUN"
    bug: "356552869"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "notifications_footer_view_refactor"
    namespace: "systemui"
+12 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.view.ViewGroup;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.policy.SystemBarUtils;
import com.android.keyguard.BouncerPanelExpansionCalculator;
import com.android.systemui.Flags;
import com.android.systemui.animation.ShadeInterpolation;
import com.android.systemui.res.R;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
@@ -467,10 +468,20 @@ public class StackScrollAlgorithm {
                    if (v instanceof EmptyShadeView) {
                        emptyShadeVisible = true;
                    }
                    if (v instanceof FooterView) {
                    if (v instanceof FooterView footerView) {
                        if (emptyShadeVisible || notGoneIndex == 0) {
                            // if the empty shade is visible or the footer is the first visible
                            // view, we're in a transitory state so let's leave the footer alone.
                            if (Flags.notificationsFooterVisibilityFix()
                                    && !SceneContainerFlag.isEnabled()) {
                                // ...except for the hidden state, to prevent it from flashing on
                                // the screen (this piece is copied from updateChild, and is not
                                // necessary in flexiglass).
                                if (footerView.shouldBeHidden()
                                        || !ambientState.isShadeExpanded()) {
                                    footerView.getViewState().hidden = true;
                                }
                            }
                            continue;
                        }
                    }