summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/aconfig/systemui.aconfig10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java13
2 files changed, 22 insertions, 1 deletions
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index 7b8dddb557a9..227878975114 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -81,6 +81,16 @@ flag {
}
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"
description: "Enables the refactored version of the footer view in the notification shade "
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
index 109f0ae41d76..b251b078826b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
@@ -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;
}
}