Only check for badge setting on notification on O+
Bug: 33553066
Change-Id: I20b991ae23c92c81510986191c05426ea72d273b
diff --git a/src/com/android/launcher3/notification/NotificationListener.java b/src/com/android/launcher3/notification/NotificationListener.java
index 9b88154..d9f7d76 100644
--- a/src/com/android/launcher3/notification/NotificationListener.java
+++ b/src/com/android/launcher3/notification/NotificationListener.java
@@ -26,6 +26,7 @@
import android.support.v4.util.Pair;
import com.android.launcher3.LauncherModel;
+import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.util.PackageUserKey;
@@ -214,9 +215,11 @@
}
private boolean shouldBeFilteredOut(StatusBarNotification sbn) {
- getCurrentRanking().getRanking(sbn.getKey(), mTempRanking);
- if (!mTempRanking.canShowBadge()) {
- return true;
+ if (Utilities.isAtLeastO()) {
+ getCurrentRanking().getRanking(sbn.getKey(), mTempRanking);
+ if (!mTempRanking.canShowBadge()) {
+ return true;
+ }
}
Notification notification = sbn.getNotification();
boolean isGroupHeader = (notification.flags & Notification.FLAG_GROUP_SUMMARY) != 0;