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

Commit 19b2ce7a authored by Gustav Sennton's avatar Gustav Sennton Committed by Android (Google) Code Review
Browse files

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

parents 07a9e9f9 36fc266f
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);
                }