commit | 96eed64a0916c872f18dfb5513a9055313c6f447 | [log] [tgz] |
---|---|---|
author | Kevin <kevhan@google.com> | Wed Sep 05 18:53:33 2018 -0700 |
committer | Kevin <kevhan@google.com> | Tue Sep 11 15:49:27 2018 -0700 |
tree | 2222652d9552da6ef6e94ea61fb6129f45bea90a | |
parent | e006ff31414a3d2f24ecba5ede6d5f6d4cb1bf4c [diff] [blame] |
Add NotificationGroupManagerTest Add some unit tests for NotificationGroupManager testing some basic functionality and also some of the complex heads up logic. Bug: 79705024 Test: runtest systemui Change-Id: I73f01827063d2704a4e1b1d18d479d4e9375447e
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 5fe362f..6b6566c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
@@ -415,10 +415,10 @@ return false; } NotificationGroup group = mGroupMap.get(getGroupKey(sbn)); - if (group == null) { + if (group == null || group.summary == null) { return false; } - return !group.children.isEmpty(); + return !group.children.isEmpty() && Objects.equals(group.summary.notification, sbn); } /**