From 106c4613b63e212ae438aa09be8e3b2e9a46e3c4 Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Wed, 26 May 2021 10:24:28 -0500 Subject: [PATCH] Do not show footer when shade is closed Fixes: 185746065 Test: footer hidden for unlocked hun and lockscreen Change-Id: I6588e91fc9e2d9a42cded21ed1811a0bbd7607b0 --- .../statusbar/notification/stack/StackScrollAlgorithm.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 d9cbfda8b3c83..8c7025e7db42c 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 @@ -414,13 +414,15 @@ public class StackScrollAlgorithm { } if (view instanceof FooterView) { + final boolean shadeClosed = !ambientState.isShadeExpanded(); final boolean isShelfShowing = algorithmState.firstViewInShelf != null; final float footerEnd = algorithmState.mCurrentExpandedYPosition + view.getIntrinsicHeight(); final boolean noSpaceForFooter = footerEnd > ambientState.getStackEndHeight(); - viewState.hidden = isShelfShowing || noSpaceForFooter; + viewState.hidden = shadeClosed || isShelfShowing || noSpaceForFooter; + } else if (view != ambientState.getTrackedHeadsUpRow()) { if (ambientState.isExpansionChanging()) { // Show all views. Views below the shelf will later be clipped (essentially hidden)