Merge "Fix NPE in SystemUI" into main am: 548ee3851e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3039652

Change-Id: I5554c72a0afa2f81fedb1f66dbddaa4f7b65dbf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterLogger.kt
index 4211cab..66e909c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterLogger.kt
@@ -70,7 +70,7 @@
     fun logSendPendingIntent(entry: NotificationEntry, pendingIntent: PendingIntent, result: Int) {
         buffer.log(TAG, INFO, {
             str1 = entry.logKey
-            str2 = pendingIntent.intent.toString()
+            str2 = pendingIntent.intent?.toString()
             int1 = result
         }, {
             "(5/5) Started intent $str2 for notification $str1 with result code $int1"
@@ -120,7 +120,7 @@
     fun logSendingFullScreenIntent(entry: NotificationEntry, pendingIntent: PendingIntent) {
         buffer.log(TAG, INFO, {
             str1 = entry.logKey
-            str2 = pendingIntent.intent.toString()
+            str2 = pendingIntent.intent?.toString()
         }, {
             "Notification $str1 has fullScreenIntent; sending fullScreenIntent $str2"
         })