Do not show footer when shade is closed

Fixes: 185746065
Test: footer hidden for unlocked hun and lockscreen
Change-Id: I6588e91fc9e2d9a42cded21ed1811a0bbd7607b0
This commit is contained in:
Lyn Han
2021-05-26 10:24:28 -05:00
parent 79e39e8e77
commit 106c4613b6

View File

@@ -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)