summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2016-06-17 21:01:32 -0700
committer Selim Cinek <cinek@google.com> 2016-06-17 21:01:32 -0700
commit88086e718340fdb869cea40b20ae1d747074bc43 (patch)
tree30790ceba93ad1c29f0970d5f98aed8c6aa1cd31
parente5ec413c13fbfeb9eafbaa5340aca6ff6c809cc4 (diff)
Fixed a stackoverflow in notifications
Change-Id: I29ce76593af81ad6e326d2e273fd872a4d9d4a89 Fixes: 29464060
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
index 9ecff18d2d11..204ab7e3aa80 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
@@ -213,18 +213,18 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged
return isGroupSuppressed(getGroupKey(sbn)) && sbn.getNotification().isGroupSummary();
}
- public boolean isOnlyChildInSuppressedGroup(StatusBarNotification sbn) {
- return isGroupSuppressed(sbn.getGroupKey())
- && isOnlyChild(sbn);
- }
-
private boolean isOnlyChild(StatusBarNotification sbn) {
return !sbn.getNotification().isGroupSummary()
&& getTotalNumberOfChildren(sbn) == 1;
}
public boolean isOnlyChildInGroup(StatusBarNotification sbn) {
- return isOnlyChild(sbn) && getLogicalGroupSummary(sbn) != null;
+ if (!isOnlyChild(sbn)) {
+ return false;
+ }
+ ExpandableNotificationRow logicalGroupSummary = getLogicalGroupSummary(sbn);
+ return logicalGroupSummary != null
+ && !logicalGroupSummary.getStatusBarNotification().equals(sbn);
}
private int getTotalNumberOfChildren(StatusBarNotification sbn) {