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

Commit 106c4613 authored by Lyn Han's avatar Lyn Han
Browse files

Do not show footer when shade is closed

Fixes: 185746065
Test: footer hidden for unlocked hun and lockscreen
Change-Id: I6588e91fc9e2d9a42cded21ed1811a0bbd7607b0
parent 79e39e8e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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)