diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-22 06:28:00 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-22 06:28:00 +1300 |
commit | d08857e6c87d41eba835f16035e2da9159de9e49 (patch) | |
tree | 771662499c4793b7649caf7270a3a126a6cebeb8 /src/org/traccar/database/NotificationManager.java | |
parent | 82f51b570a0957587b25b48fdb5cfd21c4b14e9d (diff) | |
download | trackermap-server-d08857e6c87d41eba835f16035e2da9159de9e49.tar.gz trackermap-server-d08857e6c87d41eba835f16035e2da9159de9e49.tar.bz2 trackermap-server-d08857e6c87d41eba835f16035e2da9159de9e49.zip |
Implement unknown status event
Diffstat (limited to 'src/org/traccar/database/NotificationManager.java')
-rw-r--r-- | src/org/traccar/database/NotificationManager.java | 6 |
1 files changed, 3 insertions, 3 deletions
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<Event> 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<Notification> getAllNotifications() { - Set<Notification> 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; } + } |