From e2fe52c2c087ad361037072eb581fc6aa04031c6 Mon Sep 17 00:00:00 2001 From: Ned Burns Date: Fri, 26 Jun 2020 18:10:34 -0400 Subject: [PATCH] Fix NPE in NotificationRemoteInputManager logging Test: atest Bug: 159690333 Change-Id: I9e0edbea718961a87f7210a7f390ea0b3b5b8e13 --- .../systemui/statusbar/NotificationRemoteInputManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java index 710ac9e03355d..6b023c07b1a62 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java @@ -181,11 +181,11 @@ public class NotificationRemoteInputManager implements Dumpable { return; } ViewParent parent = view.getParent(); - StatusBarNotification statusBarNotification = entry.getSbn(); - if (statusBarNotification == null) { + if (entry == null) { Log.w(TAG, "Couldn't determine notification for click."); return; } + StatusBarNotification statusBarNotification = entry.getSbn(); String key = statusBarNotification.getKey(); int buttonIndex = -1; // If this is a default template, determine the index of the button.