mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-09-05 22:15:54 +02:00
Avoid autoboxing
This commit is contained in:
parent
87bee53ef3
commit
08595f4e3d
@ -272,9 +272,9 @@ public class NotificationListener extends NotificationListenerService {
|
||||
|
||||
// Ignore too frequent notifications, according to user preference
|
||||
long min_timeout = prefs.getInt("notifications_timeout", 0) * 1000;
|
||||
Long cur_time = System.currentTimeMillis();
|
||||
long cur_time = System.currentTimeMillis();
|
||||
if (notificationTimes.containsKey(source)) {
|
||||
Long last_time = notificationTimes.get(source);
|
||||
long last_time = notificationTimes.get(source);
|
||||
if (cur_time - last_time < min_timeout) {
|
||||
LOG.info("Ignoring frequent notification, last one was " + (cur_time - last_time) + "ms ago");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user