diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 1161ffc5390b7..b4dffc703a3c1 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -6802,9 +6802,13 @@ public class NotificationManagerService extends SystemService { boolean hasValidVibrate = false; boolean hasValidSound = false; boolean sentAccessibilityEvent = false; - // If the notification will appear in the status bar, it should send an accessibility - // event - if (!record.isUpdate && record.getImportance() > IMPORTANCE_MIN) { + + // If the notification will appear in the status bar, it should send an accessibility event + final boolean suppressedByDnd = record.isIntercepted() + && (record.getSuppressedVisualEffects() & SUPPRESSED_EFFECT_STATUS_BAR) != 0; + if (!record.isUpdate + && record.getImportance() > IMPORTANCE_MIN + && !suppressedByDnd) { sendAccessibilityEvent(notification, record.getSbn().getPackageName()); sentAccessibilityEvent = true; }