diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-03-07 21:21:22 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-03-07 21:21:22 -0800 |
commit | bf51c1994531da91f364b81d6d8c0778ed9c3570 (patch) | |
tree | d39930217931b52a763162dc946c72822a524d9b /src/org/traccar/database/ConnectionManager.java | |
parent | 4e68a40c77240800dce14094b4cc55907410c208 (diff) | |
download | trackermap-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.java | 6 |
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); } |