mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
Hide the first stats waypoint.
This commit is contained in:
@@ -201,7 +201,10 @@ public class MyTracksMap extends MapActivity
|
||||
MyTracksConstants.MAX_DISPLAYED_WAYPOINTS_POINTS);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
do {
|
||||
mapOverlay.addWaypoint(providerUtils.createWaypoint(cursor));
|
||||
Waypoint waypoint = providerUtils.createWaypoint(cursor);
|
||||
if (MyTracksUtils.isValidLocation(waypoint.getLocation())) {
|
||||
mapOverlay.addWaypoint(waypoint);
|
||||
}
|
||||
} while (cursor.moveToNext());
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
|
||||
@@ -897,7 +897,14 @@ public class TrackRecordingService extends Service implements LocationListener {
|
||||
}
|
||||
wpt.setTrackId(recordingTrackId);
|
||||
wpt.setLength(length);
|
||||
if (lastValidLocation != null) {
|
||||
if (lastValidLocation == null) {
|
||||
// A null location is ok, and expected on track start.
|
||||
// Make it an impossible location.
|
||||
Location l = new Location("");
|
||||
l.setLatitude(100);
|
||||
l.setLongitude(200);
|
||||
wpt.setLocation(l);
|
||||
} else {
|
||||
// A null location is ok, and expected on track start.
|
||||
wpt.setLocation(lastLocation);
|
||||
wpt.setDuration(lastLocation.getTime()
|
||||
|
||||
Reference in New Issue
Block a user