aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/ConnectionManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-03-07 21:21:22 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-03-07 21:21:22 -0800
commitbf51c1994531da91f364b81d6d8c0778ed9c3570 (patch)
treed39930217931b52a763162dc946c72822a524d9b /src/org/traccar/database/ConnectionManager.java
parent4e68a40c77240800dce14094b4cc55907410c208 (diff)
downloadtrackermap-server-bf51c1994531da91f364b81d6d8c0778ed9c3570.tar.gz
trackermap-server-bf51c1994531da91f364b81d6d8c0778ed9c3570.tar.bz2
trackermap-server-bf51c1994531da91f364b81d6d8c0778ed9c3570.zip
Refactor overspeed handler
Diffstat (limited to 'src/org/traccar/database/ConnectionManager.java')
-rw-r--r--src/org/traccar/database/ConnectionManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/database/ConnectionManager.java b/src/org/traccar/database/ConnectionManager.java
index fc52fc375..157f2d0a8 100644
--- a/src/org/traccar/database/ConnectionManager.java
+++ b/src/org/traccar/database/ConnectionManager.java
@@ -22,6 +22,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.Context;
import org.traccar.GlobalTimer;
+import org.traccar.Main;
import org.traccar.Protocol;
import org.traccar.handler.events.OverspeedEventHandler;
import org.traccar.model.Device;
@@ -152,8 +153,9 @@ public class ConnectionManager {
result.putAll(event);
}
- event = Context.getOverspeedEventHandler().updateOverspeedState(deviceState, Context.getDeviceManager().
- lookupAttributeDouble(deviceId, OverspeedEventHandler.ATTRIBUTE_SPEED_LIMIT, 0, false));
+ event = Main.getInjector().getInstance(OverspeedEventHandler.class)
+ .updateOverspeedState(deviceState, Context.getDeviceManager().
+ lookupAttributeDouble(deviceId, OverspeedEventHandler.ATTRIBUTE_SPEED_LIMIT, 0, false));
if (event != null) {
result.putAll(event);
}