SysUI: Suppress HUNs from non-profile users
Bug: 17364652 Change-Id: Ic7a971d64cecc1624b872c776efeaccd09144db7
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user