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

Commit 7a082475 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Assume the worst when EntryManager is missing."

parents ba399e5e 9447b83c
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -272,12 +272,20 @@ public class NotificationLockscreenUserManager implements Dumpable {
     * package-specific override.
     */
    public boolean shouldHideNotifications(String key) {
        if (mEntryManager == null) {
            Log.wtf(TAG, "mEntryManager was null!", new Throwable());
            return true;
        }
        return isLockscreenPublicMode(mCurrentUserId)
                && mEntryManager.getNotificationData().getVisibilityOverride(key) ==
                        Notification.VISIBILITY_SECRET;
    }

    public boolean shouldShowOnKeyguard(StatusBarNotification sbn) {
        if (mEntryManager == null) {
            Log.wtf(TAG, "mEntryManager was null!", new Throwable());
            return false;
        }
        return mShowLockscreenNotifications
                && !mEntryManager.getNotificationData().isAmbient(sbn.getKey());
    }
@@ -397,6 +405,10 @@ public class NotificationLockscreenUserManager implements Dumpable {
    }

    private boolean packageHasVisibilityOverride(String key) {
        if (mEntryManager == null) {
            Log.wtf(TAG, "mEntryManager was null!", new Throwable());
            return true;
        }
        return mEntryManager.getNotificationData().getVisibilityOverride(key) ==
                Notification.VISIBILITY_PRIVATE;
    }