When a new group summary is added, clean up any ungrouped children
If a child notification of a group is added sufficiently before its summary, GroupHelper keeps it in the list of ungrouped child notifications without summaries. If it is still ungrouped when the summary comes in, then it will be grouped in the UI and should not then be re-autogrouped later.
In practice, this means that if a group summary is posted while a child is still ungrouped, it will be grouped as the app intended; if the child has already been autogrouped at that point with other app notifications, it will remain in the aggregated autogroup.
Bug: 394020651
Test: manual with test scenario, GroupHelperTest
Flag: android.service.notification.notification_force_grouping
Change-Id: I88dfcc1439e81421bde2be97116e93b29e5d2e32
3 files changed