diff options
| author | Po Lu | 2024-03-12 08:51:52 +0800 |
|---|---|---|
| committer | Po Lu | 2024-03-12 08:51:52 +0800 |
| commit | bf38783c32e794e46fd03210242f265f34257940 (patch) | |
| tree | 42558afd6ad8e812c80b9f9d304dfa4ddda11cfe /java | |
| parent | a7a37341cad230448e487d0ffa343eeeb8a66a65 (diff) | |
| download | emacs-bf38783c32e794e46fd03210242f265f34257940.tar.gz emacs-bf38783c32e794e46fd03210242f265f34257940.zip | |
Fix notification cancellation detection on Android
* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't specify FLAG_ONE_SHOT in cancel intents.
Diffstat (limited to 'java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsDesktopNotification.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/java/org/gnu/emacs/EmacsDesktopNotification.java b/java/org/gnu/emacs/EmacsDesktopNotification.java index f52c3d9d4fb..d05ed2e6203 100644 --- a/java/org/gnu/emacs/EmacsDesktopNotification.java +++ b/java/org/gnu/emacs/EmacsDesktopNotification.java | |||
| @@ -281,11 +281,9 @@ public final class EmacsDesktopNotification | |||
| 281 | 281 | ||
| 282 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) | 282 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) |
| 283 | pending = PendingIntent.getBroadcast (context, 0, intent, | 283 | pending = PendingIntent.getBroadcast (context, 0, intent, |
| 284 | (PendingIntent.FLAG_IMMUTABLE | 284 | PendingIntent.FLAG_IMMUTABLE); |
| 285 | | PendingIntent.FLAG_ONE_SHOT)); | ||
| 286 | else | 285 | else |
| 287 | pending = PendingIntent.getBroadcast (context, 0, intent, | 286 | pending = PendingIntent.getBroadcast (context, 0, intent, 0); |
| 288 | PendingIntent.FLAG_ONE_SHOT); | ||
| 289 | 287 | ||
| 290 | notification.deleteIntent = pending; | 288 | notification.deleteIntent = pending; |
| 291 | manager.notify (tag, 2, notification); | 289 | manager.notify (tag, 2, notification); |