summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff DeCew <jeffdq@google.com> 2021-07-20 15:34:30 -0400
committer Jeff DeCew <jeffdq@google.com> 2021-07-20 15:37:12 -0400
commit346be3887c91d4f90af3e98b39f750318770017e (patch)
tree1ce61e6f30a56247bed1058b12d41a7a153e6ad3
parent144dab97beede5949d1474f3faead9e0a70502ef (diff)
Fix hidden EmptyShadeView
Fixes: 193897657 Test: validate that HUNs show Test: validate that "no notifications" text shows Change-Id: I2fcd5b2712a5f4a28a8913cd8d0e29f635530e96
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java10
1 files changed, 4 insertions, 6 deletions
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 23e3742c2bdf..af9d162c3a9d 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
@@ -157,15 +157,13 @@ public class StackScrollAlgorithm {
// After the shelf has updated its yTranslation, explicitly set alpha=0 for view below shelf
// to skip rendering them in the hardware layer. We do not set them invisible because that
// runs invalidate & onDraw when these views return onscreen, which is more expensive.
+ if (shelf.getViewState().hidden) {
+ // When the shelf is hidden, it won't clip views, so we don't hide rows
+ return;
+ }
final float shelfTop = shelf.getViewState().yTranslation;
for (ExpandableView view : algorithmState.visibleChildren) {
- if (view instanceof ExpandableNotificationRow) {
- ExpandableNotificationRow row = (ExpandableNotificationRow) view;
- if (row.isHeadsUp() || row.isHeadsUpAnimatingAway()) {
- continue;
- }
- }
final float viewTop = view.getViewState().yTranslation;
if (viewTop >= shelfTop) {
view.getViewState().alpha = 0;