aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Summary.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-11-24 16:49:54 +1300
committerGitHub <noreply@github.com>2016-11-24 16:49:54 +1300
commitebe64e810bd8e57a805a571cfd6110fbc3cd57c1 (patch)
tree90d8bb347c6081116df225d5c1e08f9469458675 /src/org/traccar/reports/Summary.java
parent04f33e6ba29b3a73a65b081d2a8b6ac3e0e0ebee (diff)
parent03fb12d4a9453d6845198a167a70e720726df2e2 (diff)
downloadtrackermap-server-ebe64e810bd8e57a805a571cfd6110fbc3cd57c1.tar.gz
trackermap-server-ebe64e810bd8e57a805a571cfd6110fbc3cd57c1.tar.bz2
trackermap-server-ebe64e810bd8e57a805a571cfd6110fbc3cd57c1.zip
Merge pull request #2593 from Abyss777/attributes_helpers
Attributes helpers
Diffstat (limited to 'src/org/traccar/reports/Summary.java')
-rw-r--r--src/org/traccar/reports/Summary.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/org/traccar/reports/Summary.java b/src/org/traccar/reports/Summary.java
index 95a3737a1..b404b0ed5 100644
--- a/src/org/traccar/reports/Summary.java
+++ b/src/org/traccar/reports/Summary.java
@@ -49,12 +49,8 @@ public final class Summary {
if (firstPosition == null) {
firstPosition = position;
}
- if (previousPosition != null
- && position.getAttributes().get(Position.KEY_IGNITION) != null
- && Boolean.parseBoolean(position.getAttributes().get(Position.KEY_IGNITION).toString())
- && previousPosition.getAttributes().get(Position.KEY_IGNITION) != null
- && Boolean.parseBoolean(previousPosition.getAttributes()
- .get(Position.KEY_IGNITION).toString())) {
+ if (previousPosition != null && position.getBoolean(Position.KEY_IGNITION)
+ && previousPosition.getBoolean(Position.KEY_IGNITION)) {
result.addEngineHours(position.getFixTime().getTime()
- previousPosition.getFixTime().getTime());
}