From 5632e183f335470cbe0f0d1018a2b5b99f9d41c6 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 10 Apr 2017 15:18:48 -0700 Subject: Disable notification listener on pre-26 Also remove isAtLeastO() checks in NotificationListener Bug: 35443111 Bug: 37207407 Change-Id: If3eef406328f73d114d826e6c8a158bdc3788cac --- src/com/android/launcher3/notification/NotificationListener.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/com/android/launcher3/notification') diff --git a/src/com/android/launcher3/notification/NotificationListener.java b/src/com/android/launcher3/notification/NotificationListener.java index 75a1b8ab5..cb37f0852 100644 --- a/src/com/android/launcher3/notification/NotificationListener.java +++ b/src/com/android/launcher3/notification/NotificationListener.java @@ -28,7 +28,6 @@ import android.support.v4.util.Pair; import android.text.TextUtils; import com.android.launcher3.LauncherModel; -import com.android.launcher3.Utilities; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.util.PackageUserKey; @@ -219,11 +218,9 @@ public class NotificationListener extends NotificationListenerService { } private boolean shouldBeFilteredOut(StatusBarNotification sbn) { - if (Utilities.isAtLeastO()) { - getCurrentRanking().getRanking(sbn.getKey(), mTempRanking); - if (!mTempRanking.canShowBadge()) { - return true; - } + getCurrentRanking().getRanking(sbn.getKey(), mTempRanking); + if (!mTempRanking.canShowBadge()) { + return true; } Notification notification = sbn.getNotification(); if (mTempRanking.getChannel().getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) { -- cgit v1.2.3