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

Commit 0e09a244 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Do not show footer when shade is closed" into sc-dev

parents ca7b6935 106c4613
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -414,13 +414,15 @@ public class StackScrollAlgorithm {
        }
        }


        if (view instanceof FooterView) {
        if (view instanceof FooterView) {
            final boolean shadeClosed = !ambientState.isShadeExpanded();
            final boolean isShelfShowing = algorithmState.firstViewInShelf != null;
            final boolean isShelfShowing = algorithmState.firstViewInShelf != null;


            final float footerEnd = algorithmState.mCurrentExpandedYPosition
            final float footerEnd = algorithmState.mCurrentExpandedYPosition
                    + view.getIntrinsicHeight();
                    + view.getIntrinsicHeight();
            final boolean noSpaceForFooter = footerEnd > ambientState.getStackEndHeight();
            final boolean noSpaceForFooter = footerEnd > ambientState.getStackEndHeight();


            viewState.hidden = isShelfShowing || noSpaceForFooter;
            viewState.hidden = shadeClosed || isShelfShowing || noSpaceForFooter;

        } else if (view != ambientState.getTrackedHeadsUpRow()) {
        } else if (view != ambientState.getTrackedHeadsUpRow()) {
            if (ambientState.isExpansionChanging()) {
            if (ambientState.isExpansionChanging()) {
                // Show all views. Views below the shelf will later be clipped (essentially hidden)
                // Show all views. Views below the shelf will later be clipped (essentially hidden)