mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Avoid autoboxing
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user