mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 01:41:01 -08:00
Implement notification residency on Android
* doc/lispref/os.texi (Desktop Notifications): Document support for `:resident'. * java/org/gnu/emacs/EmacsService.java (cancelNotification): * src/android.c (android_init_emacs_service): * src/android.h (struct android_emacs_service): New function. * src/androidselect.c (android_notifications_notify_1) (Fandroid_notifications_notify): New parameter QCresident; save it within notification lists. (android_notification_deleted, android_notification_action): Adjust for changes to the format of notification lists and cancel non-resident notifications when an action is selected. (syms_of_androidselect): <QCresident>: New symbol.
This commit is contained in:
parent
bf38783c32
commit
d7ded99608
5 changed files with 75 additions and 14 deletions
|
|
@ -1967,4 +1967,29 @@ public final class EmacsService extends Service
|
|||
else
|
||||
requestStorageAccess30 ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Notification miscellany. */
|
||||
|
||||
/* Cancel any notification displayed with the tag TAG. */
|
||||
|
||||
public void
|
||||
cancelNotification (final String string)
|
||||
{
|
||||
Object tem;
|
||||
final NotificationManager manager;
|
||||
|
||||
tem = getSystemService (Context.NOTIFICATION_SERVICE);
|
||||
manager = (NotificationManager) tem;
|
||||
|
||||
runOnUiThread (new Runnable () {
|
||||
@Override
|
||||
public void
|
||||
run ()
|
||||
{
|
||||
manager.cancel (string, 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue