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

Commit 2fcbaef5 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Mark smart replies as sent on notification update/removal." into...

Merge "Merge "Mark smart replies as sent on notification update/removal." into qt-dev am: 19b2ce7a" into qt-dev-plus-aosp
parents 20196738 a70ea8b8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -273,11 +273,21 @@ public class NotificationRemoteInputManager implements Dumpable {
        mKeyguardManager = context.getSystemService(KeyguardManager.class);

        notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() {
            @Override
            public void onPreEntryUpdated(NotificationEntry entry) {
                // Mark smart replies as sent whenever a notification is updated - otherwise the
                // smart replies are never marked as sent.
                mSmartReplyController.stopSending(entry);
            }

            @Override
            public void onEntryRemoved(
                    @Nullable NotificationEntry entry,
                    NotificationVisibility visibility,
                    boolean removedByUser) {
                // We're removing the notification, the smart controller can forget about it.
                mSmartReplyController.stopSending(entry);

                if (removedByUser && entry != null) {
                    onPerformRemoveNotification(entry, entry.key);
                }