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

Commit df7b4883 authored by Sam Mortimer's avatar Sam Mortimer Committed by Gerrit Code Review
Browse files

Don't lookup application keyguard notification visibility unnecessarily

Change-Id: I7a70f2c9d9e813c71544f2446c9bc6502f061c4f
parent 4f11c26c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1735,6 +1735,9 @@ public abstract class BaseStatusBar extends SystemUI implements
    }

    private boolean shouldShowOnKeyguard(StatusBarNotification sbn) {
        if (!mShowLockscreenNotifications || mNotificationData.isAmbient(sbn.getKey())) {
            return false;
        }
        final int showOnKeyguard = mNoMan.getShowNotificationForPackageOnKeyguard(
                sbn.getPackageName(), sbn.getUid());
        boolean isKeyguardAllowedForApp =
@@ -1743,8 +1746,7 @@ public abstract class BaseStatusBar extends SystemUI implements
            isKeyguardAllowedForApp =
                    (showOnKeyguard & Notification.SHOW_NO_ONGOING_NOTI_ON_KEYGUARD) == 0;
        }
        return mShowLockscreenNotifications && !mNotificationData.isAmbient(sbn.getKey())
                && isKeyguardAllowedForApp;
        return isKeyguardAllowedForApp;
    }

    protected void setZenMode(int mode) {