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

Commit cb876b50 authored by Sam Mortimer's avatar Sam Mortimer Committed by Abhisek Devkota
Browse files

Hide privacyguard notifications on keyguard

They were never deliberately put there it just
happened as a default behaviour.  There's no
purpose served showing them on keyguard other
than to waste screen real estate.

Change-Id: I8c8f93e122a2b71ae7aadd7a49baaf7f139ecfbc
parent 28af27cd
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1738,8 +1738,15 @@ public abstract class BaseStatusBar extends SystemUI implements
        if (!mShowLockscreenNotifications || mNotificationData.isAmbient(sbn.getKey())) {
            return false;
        }
        final String pkgName = sbn.getPackageName();
        // always hide privacy guard notification on lock screen
        if (pkgName.equals("android") &&
                sbn.getId() == com.android.internal.R.string.privacy_guard_notification) {
            return false;
        }
        // retrieve per app visibility setting
        final int showOnKeyguard = mNoMan.getShowNotificationForPackageOnKeyguard(
                sbn.getPackageName(), sbn.getUid());
                pkgName, sbn.getUid());
        boolean isKeyguardAllowedForApp =
                (showOnKeyguard & Notification.SHOW_ALL_NOTI_ON_KEYGUARD) != 0;
        if (isKeyguardAllowedForApp && sbn.isOngoing()) {