aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
index c75e9519c..94055a282 100644
--- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java
+++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
@@ -70,7 +70,13 @@ public class OsmAndProtocolDecoder extends BaseHttpProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
break;
case "valid":
- position.setValid(Boolean.parseBoolean(value));
+ if (value == "1") {
+ position.setValid(true);
+ } else if (value == "0") {
+ position.setValid(false);
+ } else {
+ position.setValid(Boolean.parseBoolean(value));
+ }
break;
case "timestamp":
try {