mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-02 20:13:36 +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:
parent
75d3dffb14
commit
1832692b22
@ -363,7 +363,11 @@ public class NotificationListener extends NotificationListenerService {
|
|||||||
mPackageLookup.add(notificationSpec.getId(), sbn.getPackageName()); // for MUTE
|
mPackageLookup.add(notificationSpec.getId(), sbn.getPackageName()); // for MUTE
|
||||||
|
|
||||||
notificationBurstPrevention.put(source, cur_time);
|
notificationBurstPrevention.put(source, cur_time);
|
||||||
|
if(0 != notification.when) {
|
||||||
notificationOldRepeatPrevention.put(source, 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);
|
GBApplication.deviceService().onNotification(notificationSpec);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user