From 9bcc04c5db8fcec3a0a70ee01fe86dccfece5bfc Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Mon, 20 Jun 2016 10:23:44 -0400 Subject: [PATCH] Fix NPE printing notification actions. Change-Id: Icb52e7bc632bf7109a75a7695fb253b2183e7360 Fixes: 29017025 --- .../notification/NotificationStation.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/com/android/settings/notification/NotificationStation.java b/src/com/android/settings/notification/NotificationStation.java index 3ae1b631879..f0e78291c72 100644 --- a/src/com/android/settings/notification/NotificationStation.java +++ b/src/com/android/settings/notification/NotificationStation.java @@ -404,14 +404,16 @@ public class NotificationStation extends SettingsPreferenceFragment { .append(bold(getString( R.string.notification_log_details_title))) .append(delim) - .append(action.title) - .append("\n ") - .append(bold(getString( - R.string.notification_log_details_content_intent))) - .append(delim) - .append(formatPendingIntent(action.actionIntent)); + .append(action.title); + if (action.actionIntent != null) { + sb.append("\n ") + .append(bold(getString( + R.string.notification_log_details_content_intent))) + .append(delim) + .append(formatPendingIntent(action.actionIntent)); + } if (action.getRemoteInputs() != null) { - sb.append(' ') + sb.append("\n ") .append(bold(getString( R.string.notification_log_details_remoteinput))) .append(delim)