1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 12:56:49 +01:00

Skip duplicate notification prevention for apps that do not populate

the "when" field, like some Calendar apps.

Closes #1397
This commit is contained in:
Daniele Gobbetti 2019-01-26 16:17:51 +01:00
parent 75d3dffb14
commit 1832692b22

View File

@ -363,7 +363,11 @@ public class NotificationListener extends NotificationListenerService {
mPackageLookup.add(notificationSpec.getId(), sbn.getPackageName()); // for MUTE
notificationBurstPrevention.put(source, cur_time);
notificationOldRepeatPrevention.put(source, notification.when);
if(0 != notification.when) {
notificationOldRepeatPrevention.put(source, notification.when);
}else {
LOG.info("This app might show old/duplicate notifications. notification.when is 0 for " + source);
}
GBApplication.deviceService().onNotification(notificationSpec);
}