summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorChristoph Studer <chstuder@google.com>2014-06-17 23:20:54 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-06-17 23:20:54 +0000
commit5ced68ba2f83caa102745246ecc72f5f5c297a62 (patch)
treeabb717c55e24424d944a7bd5cb6fcca68e05533d /packages/SystemUI
parent87161a76677dfd35abf6940f0daf16b9a9f77293 (diff)
parentc08cd7cc65491af24c1855d53a23cc9b68d3791d (diff)
downloadframeworks_base-5ced68ba2f83caa102745246ecc72f5f5c297a62.zip
frameworks_base-5ced68ba2f83caa102745246ecc72f5f5c297a62.tar.gz
frameworks_base-5ced68ba2f83caa102745246ecc72f5f5c297a62.tar.bz2
am cf24e6de: SysUI: Hide grouped notifications
* commit 'cf24e6de68cff14970e57069febd5d6c41c264f4': SysUI: Hide grouped notifications
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 20684a1..5bc23b5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -311,8 +311,27 @@ public abstract class BaseStatusBar extends SystemUI implements
mHandler.post(new Runnable() {
@Override
public void run() {
- if (mNotificationData.findByKey(sbn.getKey()) != null ||
- isHeadsUp(sbn.getKey())) {
+ Notification n = sbn.getNotification();
+ boolean isUpdate = mNotificationData.findByKey(sbn.getKey()) != null
+ || isHeadsUp(sbn.getKey());
+ boolean isGroupedChild = n.getGroup() != null
+ && (n.flags & Notification.FLAG_GROUP_SUMMARY) == 0;
+ if (isGroupedChild) {
+ if (DEBUG) {
+ Log.d(TAG, "Ignoring group child: " + sbn);
+ }
+ // Don't show grouped notifications. If this is an
+ // update, i.e. the notification existed before but
+ // wasn't a group child, remove the old instance.
+ // Otherwise just update the ranking.
+ if (isUpdate) {
+ removeNotificationInternal(sbn.getKey(), rankingMap);
+ } else {
+ updateRankingInternal(rankingMap);
+ }
+ return;
+ }
+ if (isUpdate) {
updateNotificationInternal(sbn, rankingMap);
} else {
addNotificationInternal(sbn, rankingMap);