commit | 2f9dbbaee7d9add7656614d8cff387561ba859ba | [log] [tgz] |
---|---|---|
author | Christoph Studer <chstuder@google.com> | Wed Sep 03 17:35:54 2014 +0200 |
committer | Christoph Studer <chstuder@google.com> | Wed Sep 03 19:20:56 2014 +0200 |
tree | fbf6066ab890efa613fcec90827b905f2aa16a46 | |
parent | 09cfeaff8e0c744085f0d068e41ad59f2639907f [diff] |
SysUI: Suppress HUNs from non-profile users Bug: 17364652 Change-Id: Ic7a971d64cecc1624b872c776efeaccd09144db7
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 37bc7c0..dcd89ee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1904,6 +1904,13 @@ } protected boolean shouldInterrupt(StatusBarNotification sbn) { + if (mNotificationData.shouldFilterOut(sbn)) { + if (DEBUG) { + Log.d(TAG, "Skipping HUN check for " + sbn.getKey() + " since it's filtered out."); + } + return false; + } + Notification notification = sbn.getNotification(); // some predicates to make the boolean logic legible boolean isNoisy = (notification.defaults & Notification.DEFAULT_SOUND) != 0
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java index 454041c..cef889c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
@@ -221,7 +221,7 @@ return mGroupsWithSummaries.contains(groupKey); } - private boolean shouldFilterOut(StatusBarNotification sbn) { + boolean shouldFilterOut(StatusBarNotification sbn) { if (!(mEnvironment.isDeviceProvisioned() || showNotificationEvenIfUnprovisioned(sbn))) { return true;