commit | 4f7b53dee7f01967b9623d4a12f06c62b160f381 | [log] [tgz] |
---|---|---|
author | Beverly <beverlyt@google.com> | Tue Nov 20 09:56:31 2018 -0500 |
committer | Beverly <beverlyt@google.com> | Tue Nov 20 09:58:06 2018 -0500 |
tree | deda90b8689e4f8d14cd41036780512d58526c69 | |
parent | 0479cde2b7d567dd154027797f2bea1b22e6cc90 [diff] |
Use isGroupBlocked to check for blocked notifGroup Avoids null pointer exception Test: atest PreferencesHelperTest Change-Id: Ic94b6f1f8768d4cb4afcdef8ec03165e6523188e Fixes: 119798101
diff --git a/services/core/java/com/android/server/notification/PreferencesHelper.java b/services/core/java/com/android/server/notification/PreferencesHelper.java index fd65ebe..eb46d53 100644 --- a/services/core/java/com/android/server/notification/PreferencesHelper.java +++ b/services/core/java/com/android/server/notification/PreferencesHelper.java
@@ -1015,10 +1015,8 @@ private boolean channelIsLive(PackagePreferences pkgPref, NotificationChannel channel) { // Channel is in a group that's blocked - if (!TextUtils.isEmpty(channel.getGroup())) { - if (pkgPref.groups.get(channel.getGroup()).isBlocked()) { - return false; - } + if (isGroupBlocked(pkgPref.pkg, pkgPref.uid, channel.getGroup())) { + return false; } // Channel is deleted or is blocked