From da2ab115516a1976442c12463904ac3d1fd4ba86 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 4 Mar 2021 10:56:57 +0900 Subject: [PATCH] Fix group summary suppression logic when without bubbles The current logic of updateSuppression() concludes there is no child notification when there is no Bubbles defined. Bug: 161980186 Bug: 174623537 Test: atest SystemUITests:com.android.systemui.statusbar.notification Change-Id: Iad4ea8117ef9bd7f813854eb6ed353df64fbdedd --- .../collection/legacy/NotificationGroupManagerLegacy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/NotificationGroupManagerLegacy.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/NotificationGroupManagerLegacy.java index 3db544011700a..d6356de5ea51b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/NotificationGroupManagerLegacy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/legacy/NotificationGroupManagerLegacy.java @@ -242,12 +242,12 @@ public class NotificationGroupManagerLegacy implements OnHeadsUpChangedListener, int childCount = 0; boolean hasBubbles = false; for (NotificationEntry entry : group.children.values()) { - if (mBubblesOptional.isPresent() && !mBubblesOptional.get() + if (mBubblesOptional.isPresent() && mBubblesOptional.get() .isBubbleNotificationSuppressedFromShade( entry.getKey(), entry.getSbn().getGroupKey())) { - childCount++; - } else { hasBubbles = true; + } else { + childCount++; } }