forked from upstream-mirrors/OpenTracks
Bugfix for empty total time in trip statistics and missing first location in exported files
This commit is contained in:
+3
-2
@@ -860,13 +860,14 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (cursor.moveToNext()) {
|
do {
|
||||||
Location location = createLocation(cursor);
|
Location location = createLocation(cursor);
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
buffer.add(location, cursor.getLong(idColumnIdx));
|
buffer.add(location, cursor.getLong(idColumnIdx));
|
||||||
}
|
} while (cursor.moveToNext());
|
||||||
|
|
||||||
if (buffer.getLocationsLoaded() == 0) {
|
if (buffer.getLocationsLoaded() == 0) {
|
||||||
Log.w(MyTracksProvider.TAG, "No locations read.");
|
Log.w(MyTracksProvider.TAG, "No locations read.");
|
||||||
buffer.resetAt(startingPoint + buffer.getSize());
|
buffer.resetAt(startingPoint + buffer.getSize());
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class TripStatistics implements Parcelable {
|
|||||||
* stopped
|
* stopped
|
||||||
*/
|
*/
|
||||||
public long getStopTime() {
|
public long getStopTime() {
|
||||||
return startTime;
|
return stopTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user