diff options
author | Kevin Goos <kevingoos@telenet.be> | 2018-07-19 10:35:57 +0200 |
---|---|---|
committer | Kevin Goos <kevingoos@telenet.be> | 2018-07-19 10:35:57 +0200 |
commit | b8f17ea08288c62f22133156364f444b1e25c74b (patch) | |
tree | 0f3854d881a1d0f69910c79b15b223e394faf925 /src/org/traccar/protocol | |
parent | c6d6288d37a000cf364dce4753c24924f9fcc7de (diff) | |
download | trackermap-server-b8f17ea08288c62f22133156364f444b1e25c74b.tar.gz trackermap-server-b8f17ea08288c62f22133156364f444b1e25c74b.tar.bz2 trackermap-server-b8f17ea08288c62f22133156364f444b1e25c74b.zip |
Fixed osmand code making it more elegant and fixing mistake
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 8 |
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 { |