aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events/MotionEventHandler.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-06-15 14:22:23 +0500
committerAbyss777 <abyss@fox5.ru>2016-06-15 14:22:23 +0500
commitf08bb5adf425269a00e760c669bdeeadc8c7e112 (patch)
treec2215abadf212d5e56def143e906683f8390f677 /src/org/traccar/events/MotionEventHandler.java
parent8ddcc66dc6441ce8f8a122d09872c143922fa0f0 (diff)
downloadtrackermap-server-f08bb5adf425269a00e760c669bdeeadc8c7e112.tar.gz
trackermap-server-f08bb5adf425269a00e760c669bdeeadc8c7e112.tar.bz2
trackermap-server-f08bb5adf425269a00e760c669bdeeadc8c7e112.zip
- Work only with cached devices from everywhere
- Some optimization
Diffstat (limited to 'src/org/traccar/events/MotionEventHandler.java')
-rw-r--r--src/org/traccar/events/MotionEventHandler.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/events/MotionEventHandler.java b/src/org/traccar/events/MotionEventHandler.java
index 54b6b922d..2ba5979e3 100644
--- a/src/org/traccar/events/MotionEventHandler.java
+++ b/src/org/traccar/events/MotionEventHandler.java
@@ -29,11 +29,10 @@ public class MotionEventHandler extends BaseEventHandler {
double speed = position.getSpeed();
boolean valid = position.getValid();
- Device device = Context.getIdentityManager().getDeviceById(position.getDeviceId());
- if (device == null) {
+ if (getDevice() == null) {
return null;
}
- String motion = device.getMotion();
+ String motion = getDevice().getMotion();
if (motion == null) {
motion = Device.STATUS_STOPPED;
}