]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix notification cancellation detection on Android
authorPo Lu <luangruo@yahoo.com>
Tue, 12 Mar 2024 00:51:52 +0000 (08:51 +0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 15 Mar 2024 08:58:02 +0000 (09:58 +0100)
* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't specify FLAG_ONE_SHOT in cancel intents.

(cherry picked from commit bf38783c32e794e46fd03210242f265f34257940)

java/org/gnu/emacs/EmacsDesktopNotification.java

index f52c3d9d4fbaf0055c1b1a4ccb8bce4f4f26a7a9..d05ed2e62038e61d9ad3b46604003945475b29e7 100644 (file)
@@ -281,11 +281,9 @@ public final class EmacsDesktopNotification
 
     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
       pending = PendingIntent.getBroadcast (context, 0, intent,
-                                           (PendingIntent.FLAG_IMMUTABLE
-                                            | PendingIntent.FLAG_ONE_SHOT));
+                                           PendingIntent.FLAG_IMMUTABLE);
     else
-      pending = PendingIntent.getBroadcast (context, 0, intent,
-                                           PendingIntent.FLAG_ONE_SHOT);
+      pending = PendingIntent.getBroadcast (context, 0, intent, 0);
 
     notification.deleteIntent = pending;
     manager.notify (tag, 2, notification);