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

Commit bdb7df21 authored by Sam Mortimer's avatar Sam Mortimer Committed by Clark Scheff
Browse files

Don't lookup application keyguard notification visibility unnecessarily

TICKET: CRACKLING-1127
Change-Id: I7a70f2c9d9e813c71544f2446c9bc6502f061c4f
parent ee43aa50
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1902,6 +1902,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 =
@@ -1910,8 +1913,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) {