Update the autogroup summary icon on notification changes
When child notifications of an auto-group are posted/removed, the summary icon should be updated as well.
In the case of posted notifications, summary updates are always triggered by GroupHelper. In the case of removed notifications,
if no summary updates are triggered (flags not updated or ungrouping not necessary), then NMS will trigger an icon update.
Both the icon drawable and the icon background color are updated according to this rule:
- if all child icons are identical => use the common icon
- if child icons are different: use the monochromatic app icon, if exists. Otherwise fall back to a generic icon representing a stack.
Flag: com.android.server.notification.autogroup_summary_icon_update
Test: atest NotificationManagerServiceTest
Test: atest GroupHelperTest
Test: atest IconTest
Bug: 227693160
Change-Id: Ia31d1f71bf43b8c2f5757200d79f0790bf843851
10 files changed