aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseEventHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BaseEventHandler.java')
-rw-r--r--src/org/traccar/BaseEventHandler.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/BaseEventHandler.java b/src/org/traccar/BaseEventHandler.java
index 16d911dac..78542b33a 100644
--- a/src/org/traccar/BaseEventHandler.java
+++ b/src/org/traccar/BaseEventHandler.java
@@ -14,10 +14,16 @@ public abstract class BaseEventHandler extends BaseDataHandler {
return isLastPosition;
}
+ private Device device;
+
+ public Device getDevice() {
+ return device;
+ }
+
@Override
protected Position handlePosition(Position position) {
- Device device = Context.getDataManager().getDeviceById(position.getDeviceId());
+ device = Context.getDataManager().getDeviceById(position.getDeviceId());
if (device != null) {
long lastPositionId = device.getPositionId();
if (position.getId() == lastPositionId) {