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

Commit 9184f9c4 authored by Selim Cinek's avatar Selim Cinek
Browse files

Collapse all groups now when the shade is collapsed

This could lead to huuge HUNs

Bug: 26884670
Change-Id: Ia99029ccc56b0fb9338bff32c300eaf27ea10c51
parent b66685b0
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -154,13 +154,17 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged
        }
        mBarState = newState;
        if (mBarState == StatusBarState.KEYGUARD) {
            collapseAllGroups();
        }
    }

    public void collapseAllGroups() {
        for (NotificationGroup group : mGroupMap.values()) {
            if (group.expanded) {
                setGroupExpanded(group, false);
            }
        }
    }
    }

    /**
     * @return whether a given notification is a child in a group which has a summary
+3 −0
Original line number Diff line number Diff line
@@ -2605,6 +2605,9 @@ public class NotificationStackScrollLayout extends ViewGroup
        mIsExpanded = isExpanded;
        mStackScrollAlgorithm.setIsExpanded(isExpanded);
        if (changed) {
            if (!mIsExpanded) {
                mGroupManager.collapseAllGroups();
            }
            updateNotificationAnimationStates();
            updateChronometers();
        }