Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +19 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,9 @@ public class NotificationRemoteInputManager implements Dumpable { action == null ? false : action.isAuthenticationRequired(), () -> { Pair<Intent, ActivityOptions> options = response.getLaunchOptions(view); mLogger.logStartingIntentWithDefaultHandler(entry, pendingIntent); return RemoteViews.startPendingIntent(view, pendingIntent, options); boolean started = RemoteViews.startPendingIntent(view, pendingIntent, options); if (started) releaseNotificationIfKeptForRemoteInputHistory(entry.getKey()); return started; }); } Loading Loading @@ -600,6 +602,22 @@ public class NotificationRemoteInputManager implements Dumpable { || entry.hasJustSentRemoteInput()); } /** * Checks if the notification is being kept due to the user sending an inline reply, and if * so, releases that hold. This is called anytime an action on the notification is dispatched * (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) { if (isNotificationKeptForRemoteInputHistory(key)) { mMainHandler.postDelayed(() -> { if (isNotificationKeptForRemoteInputHistory(key)) { mNotificationLifetimeFinishedCallback.onSafeToRemove(key); } }, REMOTE_INPUT_KEPT_ENTRY_AUTO_CANCEL_DELAY); } } public boolean shouldKeepForSmartReplyHistory(NotificationEntry entry) { if (!FORCE_REMOTE_INPUT_HISTORY) { return false; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +19 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,9 @@ public class NotificationRemoteInputManager implements Dumpable { action == null ? false : action.isAuthenticationRequired(), () -> { Pair<Intent, ActivityOptions> options = response.getLaunchOptions(view); mLogger.logStartingIntentWithDefaultHandler(entry, pendingIntent); return RemoteViews.startPendingIntent(view, pendingIntent, options); boolean started = RemoteViews.startPendingIntent(view, pendingIntent, options); if (started) releaseNotificationIfKeptForRemoteInputHistory(entry.getKey()); return started; }); } Loading Loading @@ -600,6 +602,22 @@ public class NotificationRemoteInputManager implements Dumpable { || entry.hasJustSentRemoteInput()); } /** * Checks if the notification is being kept due to the user sending an inline reply, and if * so, releases that hold. This is called anytime an action on the notification is dispatched * (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) { if (isNotificationKeptForRemoteInputHistory(key)) { mMainHandler.postDelayed(() -> { if (isNotificationKeptForRemoteInputHistory(key)) { mNotificationLifetimeFinishedCallback.onSafeToRemove(key); } }, REMOTE_INPUT_KEPT_ENTRY_AUTO_CANCEL_DELAY); } } public boolean shouldKeepForSmartReplyHistory(NotificationEntry entry) { if (!FORCE_REMOTE_INPUT_HISTORY) { return false; Loading