Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f9dbbae authored by Christoph Studer's avatar Christoph Studer
Browse files

SysUI: Suppress HUNs from non-profile users

Bug: 17364652
Change-Id: Ic7a971d64cecc1624b872c776efeaccd09144db7
parent 09cfeaff
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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;