diff options
author | Christoph Studer <chstuder@google.com> | 2014-06-16 18:44:51 -0700 |
---|---|---|
committer | Christoph Studer <chstuder@google.com> | 2014-06-17 23:14:12 +0000 |
commit | c08cd7cc65491af24c1855d53a23cc9b68d3791d (patch) | |
tree | 92ac6a4c80e4333cede66bcf776038dd7c020fb7 /packages | |
parent | 0d0c1775186ae88041ae74646119ee5ea2e9cf01 (diff) | |
download | frameworks_base-c08cd7cc65491af24c1855d53a23cc9b68d3791d.zip frameworks_base-c08cd7cc65491af24c1855d53a23cc9b68d3791d.tar.gz frameworks_base-c08cd7cc65491af24c1855d53a23cc9b68d3791d.tar.bz2 |
SysUI: Hide grouped notifications
Drop grouped notification received from NoMan.
Bug: 15188947
Change-Id: I8bdb99abd216d771d435d18b2018c843e7750d18
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 23 |
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 97123fa..b94493e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -310,8 +310,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); |