diff options
author | Abyss777 <abyss@fox5.ru> | 2017-03-22 17:16:04 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-03-22 17:16:04 +0500 |
commit | ce809d8f053360bd820cf05175101b92a40b8109 (patch) | |
tree | 6e28d993f24f4ee9dab7a3e06eb49cf7e3de7848 /src/org/traccar/model/Device.java | |
parent | b2584fc441a7dde87f97c66e23a7cabd9591fd13 (diff) | |
download | trackermap-server-ce809d8f053360bd820cf05175101b92a40b8109.tar.gz trackermap-server-ce809d8f053360bd820cf05175101b92a40b8109.tar.bz2 trackermap-server-ce809d8f053360bd820cf05175101b92a40b8109.zip |
Move device status initialization to model
Diffstat (limited to 'src/org/traccar/model/Device.java')
-rw-r--r-- | src/org/traccar/model/Device.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/model/Device.java b/src/org/traccar/model/Device.java index 22426c4db..4c02481ca 100644 --- a/src/org/traccar/model/Device.java +++ b/src/org/traccar/model/Device.java @@ -51,7 +51,11 @@ public class Device extends Extensible { } public void setStatus(String status) { - this.status = status; + if (STATUS_ONLINE.equals(status) || STATUS_UNKNOWN.equals(status)) { + this.status = status; + } else { + this.status = STATUS_OFFLINE; + } } private Date lastUpdate; |