Lines Matching refs:group

52         NotificationGroup group = mGroupMap.get(getGroupKey(sbn));
53 if (group == null) {
56 return group.expanded;
60 NotificationGroup group = mGroupMap.get(getGroupKey(sbn));
61 if (group == null) {
64 setGroupExpanded(group, expanded);
67 private void setGroupExpanded(NotificationGroup group, boolean expanded) {
68 group.expanded = expanded;
69 if (group.summary != null) {
70 mListener.onGroupExpansionChanged(group.summary.row, expanded);
89 final NotificationGroup group = mGroupMap.get(groupKey);
90 if (group == null) {
91 // When an app posts 2 different notifications as summary of the same group, then a
92 // cancellation of the first notification removes this group.
98 group.children.remove(removed);
100 group.summary = null;
102 updateSuppression(group);
103 if (group.children.isEmpty()) {
104 if (group.summary == null) {
114 NotificationGroup group = mGroupMap.get(groupKey);
115 if (group == null) {
116 group = new NotificationGroup();
117 mGroupMap.put(groupKey, group);
120 group.children.add(added);
121 updateSuppression(group);
123 group.summary = added;
124 group.expanded = added.row.areChildrenExpanded();
125 updateSuppression(group);
126 if (!group.children.isEmpty()) {
128 (HashSet<NotificationData.Entry>) group.children.clone();
132 mListener.onGroupCreatedFromChildren(group);
152 private void updateSuppression(NotificationGroup group) {
153 if (group == null) {
156 boolean prevSuppressed = group.suppressed;
157 group.suppressed = group.summary != null && !group.expanded
158 && (group.children.size() == 1
159 || (group.children.size() == 0
160 && group.summary.notification.getNotification().isGroupSummary()
161 && hasIsolatedChildren(group)));
162 if (prevSuppressed != group.suppressed) {
163 if (group.suppressed) {
164 handleSuppressedSummaryHeadsUpped(group.summary);
170 private boolean hasIsolatedChildren(NotificationGroup group) {
171 return getNumberOfIsolatedChildren(group.summary.notification.getGroupKey()) != 0;
232 NotificationGroup group = mGroupMap.get(sbn.getGroupKey());
233 int realChildren = group != null ? group.children.size() : 0;
238 NotificationGroup group = mGroupMap.get(groupKey);
239 return group != null && group.suppressed;
253 // Because notifications can become isolated when the group becomes suppressed it can
258 NotificationGroup group = groupCopy.get(i);
259 if (group.expanded) {
260 setGroupExpanded(group, false);
262 updateSuppression(group);
267 * @return whether a given notification is a child in a group which has a summary
273 NotificationGroup group = mGroupMap.get(getGroupKey(sbn));
274 if (group == null || group.summary == null || group.suppressed) {
277 if (group.children.isEmpty()) {
278 // If the suppression of a group changes because the last child was removed, this can
287 * @return whether a given notification is a summary in a group which has children
293 NotificationGroup group = mGroupMap.get(getGroupKey(sbn));
294 if (group == null) {
297 return !group.children.isEmpty();
320 NotificationGroup group = mGroupMap.get(groupKey);
321 return group == null ? null
322 : group.summary == null ? null
323 : group.summary.row;
326 /** @return group expansion state after toggling. */
328 NotificationGroup group = mGroupMap.get(getGroupKey(sbn));
329 if (group == null) {
332 setGroupExpanded(group, !group.expanded);
333 return group.expanded;
384 // We also need to update the suppression of the old group, because this call comes
411 // The parent of a suppressed group got huned, lets hun the child!
467 * Is this notification group suppressed, i.e its summary is hidden
485 * The expansion of a group has changed.
493 * A group of children just received a summary notification and should therefore become
496 * @param group the group created
498 void onGroupCreatedFromChildren(NotificationGroup group);
502 * group became suppressed / unsuppressed