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

Commit b24bf549 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge "Hiding all views when the notification shade is collapsed" into pi-dev

am: a1f417ca

Change-Id: I07bb66bde7633bcd52c7f875a85340fbf6b847ff
parents 438a66d7 a1f417ca
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -478,6 +478,22 @@ public class StackScrollAlgorithm {
                childState.hidden = false;
            }
        }
        // Let's hide all the views if we are not expanded. the views might otherwise be visible
        // in the headsup area if a view was swiped away
        if (!mIsExpanded) {
            for (int i = 0; i < childCount; i++) {
                boolean visible = false;
                View child = algorithmState.visibleChildren.get(i);
                if (child instanceof ExpandableNotificationRow) {
                    ExpandableNotificationRow row = (ExpandableNotificationRow) child;
                    visible = row.isHeadsUp() || row.isHeadsUpAnimatingAway();
                }
                if (!visible) {
                    ExpandableViewState childState = resultState.getViewStateForView(child);
                    childState.hidden = true;
                }
            }
        }
    }

    private void clampHunToTop(AmbientState ambientState, ExpandableNotificationRow row,