diff options
author | Tony Wickham <twickham@google.com> | 2017-04-10 23:19:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-04-10 23:19:52 +0000 |
commit | cd4cc97f6f761b8cc377821a2214432a376dd4f8 (patch) | |
tree | 05353d0dc33dce7a1caf39db612ea0365a7d27d4 | |
parent | 3b31df70ea2e9ea5f48468d5155cf90ec87d2842 (diff) | |
parent | 5632e183f335470cbe0f0d1018a2b5b99f9d41c6 (diff) | |
download | android_packages_apps_Trebuchet-cd4cc97f6f761b8cc377821a2214432a376dd4f8.tar.gz android_packages_apps_Trebuchet-cd4cc97f6f761b8cc377821a2214432a376dd4f8.tar.bz2 android_packages_apps_Trebuchet-cd4cc97f6f761b8cc377821a2214432a376dd4f8.zip |
Merge "Disable notification listener on pre-26" into ub-launcher3-dorval
-rw-r--r-- | res/values-v25/bools.xml | 22 | ||||
-rw-r--r-- | src/com/android/launcher3/notification/NotificationListener.java | 9 |
2 files changed, 3 insertions, 28 deletions
diff --git a/res/values-v25/bools.xml b/res/values-v25/bools.xml deleted file mode 100644 index 6f7ecd91a..000000000 --- a/res/values-v25/bools.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* Copyright 2017, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<resources> - <!-- TODO(b/35443111): remove from v25 and keep in v26 --> - <bool name="notification_badging_enabled">true</bool> -</resources>
\ No newline at end of file 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)) { |