SysUI: Suppress HUNs from non-profile users

Bug: 17364652
Change-Id: Ic7a971d64cecc1624b872c776efeaccd09144db7
This commit is contained in:
Christoph Studer
2014-09-03 17:35:54 +02:00
parent 09cfeaff8e
commit 2f9dbbaee7
2 changed files with 8 additions and 1 deletions

View File

@@ -1904,6 +1904,13 @@ public abstract class BaseStatusBar extends SystemUI implements
}
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

View File

@@ -221,7 +221,7 @@ public class NotificationData {
return mGroupsWithSummaries.contains(groupKey);
}
private boolean shouldFilterOut(StatusBarNotification sbn) {
boolean shouldFilterOut(StatusBarNotification sbn) {
if (!(mEnvironment.isDeviceProvisioned() ||
showNotificationEvenIfUnprovisioned(sbn))) {
return true;