mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 12:56:49 +01:00
Rebuild notification handling to work with postTime() instead of getId()
This commit is contained in:
parent
80df573ccf
commit
4fd904d33f
@ -317,7 +317,7 @@ public class NotificationListener extends NotificationListenerService {
|
||||
}
|
||||
}
|
||||
|
||||
NotificationSpec notificationSpec = new NotificationSpec(sbn.getId());
|
||||
NotificationSpec notificationSpec = new NotificationSpec();
|
||||
|
||||
// determinate Source App Name ("Label")
|
||||
String name = getAppName(source);
|
||||
@ -724,7 +724,11 @@ public class NotificationListener extends NotificationListenerService {
|
||||
Prefs prefs = GBApplication.getPrefs();
|
||||
if (prefs.getBoolean("autoremove_notifications", true)) {
|
||||
LOG.info("notification removed, will ask device to delete it");
|
||||
GBApplication.deviceService().onDeleteNotification(sbn.getId());
|
||||
Object o = mNotificationHandleLookup.lookupByValue(sbn.getPostTime());
|
||||
if(o != null) {
|
||||
int id = (int) o;
|
||||
GBApplication.deviceService().onDeleteNotification(id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user