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, 1 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
index 94055a282..b270b6071 100644
--- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java
+++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
@@ -70,13 +70,7 @@ public class OsmAndProtocolDecoder extends BaseHttpProtocolDecoder {
position.setDeviceId(deviceSession.getDeviceId());
break;
case "valid":
- if (value == "1") {
- position.setValid(true);
- } else if (value == "0") {
- position.setValid(false);
- } else {
- position.setValid(Boolean.parseBoolean(value));
- }
+ position.setValid(Boolean.parseBoolean(value) || "1".equals(value));
break;
case "timestamp":
try {