Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fe005a0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix NPE when NotificationEntry can't be found for action tap" into sc-dev am: cc3c259e

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

Change-Id: I99daa4d0c3814aca1d80129a90159b6315b9ddaa
parents b36bc773 cc3c259e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ public class NotificationRemoteInputManager implements Dumpable {
                    Pair<Intent, ActivityOptions> 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)) {