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
This commit is contained in:
Tadashi G. Takaoka
2021-03-04 10:56:57 +09:00
parent 16e2886704
commit da2ab11551

View File

@@ -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++;
}
}