diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java index 70b3a7be02fb4..ca81a7b43df66 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java @@ -169,7 +169,7 @@ public class NotificationRemoteInputManager implements Dumpable { Pair options = response.getLaunchOptions(view); mLogger.logStartingIntentWithDefaultHandler(entry, pendingIntent); boolean started = RemoteViews.startPendingIntent(view, pendingIntent, options); - if (started) releaseNotificationIfKeptForRemoteInputHistory(entry.getKey()); + if (started) releaseNotificationIfKeptForRemoteInputHistory(entry); return started; }); } @@ -608,7 +608,11 @@ public class NotificationRemoteInputManager implements Dumpable { * (after unlock, if applicable), and will then wait a short time to allow the app to update the * notification in response to the action. */ - private void releaseNotificationIfKeptForRemoteInputHistory(String key) { + private void releaseNotificationIfKeptForRemoteInputHistory(NotificationEntry entry) { + if (entry == null) { + return; + } + final String key = entry.getKey(); if (isNotificationKeptForRemoteInputHistory(key)) { mMainHandler.postDelayed(() -> { if (isNotificationKeptForRemoteInputHistory(key)) {