diff options
Diffstat (limited to 'src/org/traccar/events/MotionEventHandler.java')
-rw-r--r-- | src/org/traccar/events/MotionEventHandler.java | 5 |
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; } |