diff --git a/shade/src/amirz/unread/notifications/NotificationList.java b/shade/src/amirz/unread/notifications/NotificationList.java index f9855c0b3..d34fc6d31 100644 --- a/shade/src/amirz/unread/notifications/NotificationList.java +++ b/shade/src/amirz/unread/notifications/NotificationList.java @@ -36,11 +36,15 @@ public NotificationList(HideTracker hideTracker, Handler workerHandler, Runnable } public Map getMap() { - return getMap(Integer.MIN_VALUE); + return getMap(Integer.MIN_VALUE, true); + } + + public Map getMap(int minPriority) { + return getMap(minPriority, false); } // Warning: Call getMap only from the worker thread, to prevent modification to mSbn. - Map getMap(int minPriority) { + private Map getMap(int minPriority, boolean all) { NotificationListener nls = NotificationListener.getInstanceIfConnected(); if (nls == null) { return Collections.emptyMap(); @@ -63,7 +67,7 @@ Map getMap(int minPriority) { = nls.getNotificationsForKeys(new ArrayList<>(rankedKeys.keySet())); for (StatusBarNotification sbn : sbnList) { - if (map.getRanking(sbn.getKey(), mTempRanking) && !shouldBeFilteredOut(sbn)) { + if (map.getRanking(sbn.getKey(), mTempRanking) && (all || !shouldBeFilteredOut(sbn))) { rankedSbn.put(sbn, getRankedImportance()); } }