mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02: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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user