diff options
author | 2025-03-04 23:43:53 +0000 | |
---|---|---|
committer | 2025-03-04 23:43:53 +0000 | |
commit | 659cd955f75da8069f3616c310d97c0a63635dcb (patch) | |
tree | 10bff148c9b6e09c75cb97552bfe7972ea35eb90 | |
parent | 3035ebc07b6d609f2d206455a10b704559c4bda7 (diff) |
Fix repeat HUNs after autogrouping
Set FLAG_SILENT from:
addAutogroupKeyLocked
updateAutobundledSummaryLocked
Note that we cannot call fixSilentGroup from these places because
fixSilentGroup checks for GROUP_KEY_SILENT to fix data from
androidx apps. We want to set FLAG_SILENT regardless of mGroupKey
Bug: 396573298
Test: send delayed HUNs that are each marked as group summary,
enabled force_grouping flag, see that HUNs do not repeat
Flag: android.service.notification.notification_force_grouping
Change-Id: I22c6898f78f190e9f8cb3be8c2b626602c2e1f73
-rw-r--r-- | services/core/java/com/android/server/notification/NotificationManagerService.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 6fddfb5f90a7..8b03ff2bb3f1 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -1075,6 +1075,7 @@ public class NotificationManagerService extends SystemService { summary.getSbn().getNotification().getGroupAlertBehavior(); if (notificationForceGrouping()) { + summary.getNotification().flags |= Notification.FLAG_SILENT; if (!summary.getChannel().getId().equals(summaryAttr.channelId)) { NotificationChannel newChannel = mPreferencesHelper.getNotificationChannel(pkg, summary.getUid(), summaryAttr.channelId, false); @@ -7440,6 +7441,7 @@ public class NotificationManagerService extends SystemService { // Override group key early for forced grouped notifications r.setOverrideGroupKey(groupName); } + r.getNotification().flags |= Notification.FLAG_SILENT; } addAutoGroupAdjustment(r, groupName); |