NotificationManager: delete ongoing and MediaStyle notifications on exit

The XDG Portal API doesn't have a concept of ongoing notifications.

MediaStyle notifications could be changed to MPRIS in the future.
This commit is contained in:
Julian Winkler
2024-03-18 15:41:44 +01:00
parent acb00a8beb
commit cdcc3411aa
5 changed files with 35 additions and 7 deletions

View File

@@ -29,7 +29,7 @@ public class NotificationManager {
actionName = notification.intent.intent.getAction();
className = notification.intent.intent.getComponent() != null ? notification.intent.intent.getComponent().getClassName() : null;
}
nativeShowNotification(builder, id, notification.title, notification.text, notification.iconPath, intentType, actionName, className);
nativeShowNotification(builder, id, notification.title, notification.text, notification.iconPath, notification.ongoing, intentType, actionName, className);
}
public void notify(int id, Notification notification) {
@@ -55,5 +55,5 @@ public class NotificationManager {
protected native long nativeInitBuilder();
protected native void nativeAddAction(long builder, String title, int intentType, String action, String className);
protected native void nativeShowNotification(long builder, int id, String title, String text, String iconPath, int intentType, String action, String className);
protected native void nativeShowNotification(long builder, int id, String title, String text, String iconPath, boolean ongoing, int intentType, String action, String className);
}