From 08ebca380422c663712cc323e063466001f901ec Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Fri, 11 Jan 2019 09:17:27 -0500 Subject: [PATCH] Fix NPE Test: manual Change-Id: Ie9fe536f28d05953519a9fd477c5eaa3923be991 Fixes: 122685915 --- .../android/settings/notification/NotificationStation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/notification/NotificationStation.java b/src/com/android/settings/notification/NotificationStation.java index 116980f3085..91ebc887961 100644 --- a/src/com/android/settings/notification/NotificationStation.java +++ b/src/com/android/settings/notification/NotificationStation.java @@ -372,7 +372,7 @@ public class NotificationStation extends SettingsPreferenceFragment { sb.append("\n") .append(bold(getString(R.string.notification_log_details_sound))) .append(delim); - if (channel.getImportance() == IMPORTANCE_UNSPECIFIED) { + if (channel == null || channel.getImportance() == IMPORTANCE_UNSPECIFIED) { if (0 != (n.defaults & Notification.DEFAULT_SOUND)) { sb.append(getString(R.string.notification_log_details_default)); @@ -387,7 +387,7 @@ public class NotificationStation extends SettingsPreferenceFragment { sb.append("\n") .append(bold(getString(R.string.notification_log_details_vibrate))) .append(delim); - if (channel.getImportance() == IMPORTANCE_UNSPECIFIED) { + if (channel == null || channel.getImportance() == IMPORTANCE_UNSPECIFIED) { if (0 != (n.defaults & Notification.DEFAULT_VIBRATE)) { sb.append(getString(R.string.notification_log_details_default)); } else if (n.vibrate != null) {