From d08857e6c87d41eba835f16035e2da9159de9e49 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 22 Nov 2016 06:28:00 +1300 Subject: Implement unknown status event --- src/org/traccar/database/NotificationManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/org/traccar/database/NotificationManager.java') diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java index 110f699b7..b82fca0f3 100644 --- a/src/org/traccar/database/NotificationManager.java +++ b/src/org/traccar/database/NotificationManager.java @@ -74,7 +74,6 @@ public class NotificationManager { } public void updateEvents(Collection events, Position position) { - for (Event event : events) { updateEvent(event, position); } @@ -159,6 +158,7 @@ public class NotificationManager { } } else { notification.setId(cachedNotification.getId()); + notification.setId(cachedNotification.getId()); } } else if (!notification.getAttributes().isEmpty()) { try { @@ -176,9 +176,8 @@ public class NotificationManager { } public Set getAllNotifications() { - Set notifications = new HashSet<>(); - long id = 0; + long id = 1; Field[] fields = Event.class.getDeclaredFields(); for (Field field : fields) { if (Modifier.isStatic(field.getModifiers()) && field.getName().startsWith("TYPE_")) { @@ -194,4 +193,5 @@ public class NotificationManager { } return notifications; } + } -- cgit v1.2.3 From cd121c173f7c3ef0a815583eccec1232968894b9 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 22 Nov 2016 18:25:25 +1300 Subject: Remove duplicate line --- src/org/traccar/database/NotificationManager.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/org/traccar/database/NotificationManager.java') diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java index b82fca0f3..7e79e289f 100644 --- a/src/org/traccar/database/NotificationManager.java +++ b/src/org/traccar/database/NotificationManager.java @@ -158,7 +158,6 @@ public class NotificationManager { } } else { notification.setId(cachedNotification.getId()); - notification.setId(cachedNotification.getId()); } } else if (!notification.getAttributes().isEmpty()) { try { -- cgit v1.2.3