forked from upstream-mirrors/OpenTracks
Cleanup.
This commit is contained in:
@@ -28,7 +28,6 @@ import androidx.annotation.VisibleForTesting;
|
||||
* @author Leif Hendrik Wilden
|
||||
* @author Rodrigo Damazio
|
||||
*/
|
||||
//TODO All data should be final; no default values.
|
||||
public final class MarkerBuilder {
|
||||
|
||||
private Marker.Id id;
|
||||
@@ -57,14 +56,6 @@ public final class MarkerBuilder {
|
||||
this.position = trackPoint.position();
|
||||
}
|
||||
|
||||
public MarkerBuilder(@Nullable Track.Id trackId, @NonNull TrackPoint trackPoint, String name, String description, String typeLocalized, Uri photoUrl) {
|
||||
this(trackId, trackPoint);
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.typeLocalized = typeLocalized;
|
||||
this.photoUrl = photoUrl;
|
||||
}
|
||||
|
||||
public MarkerBuilder(Marker marker) {
|
||||
this.id = marker.id();
|
||||
this.trackId = marker.trackId();
|
||||
|
||||
@@ -20,6 +20,7 @@ import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@@ -63,7 +64,7 @@ public record TrackPoint(
|
||||
);
|
||||
}
|
||||
|
||||
@Deprecated //TOOD Private?
|
||||
@VisibleForTesting
|
||||
public TrackPoint(Type type, Instant now) {
|
||||
this(
|
||||
null,
|
||||
|
||||
@@ -297,7 +297,17 @@ public class GPXTrackImporter extends DefaultHandler implements XMLImporter.Trac
|
||||
}
|
||||
|
||||
if (latitude == null || longitude == null) {
|
||||
return new TrackPoint(TrackPoint.Type.TRACKPOINT, parsedTime.toInstant());
|
||||
return new TrackPoint(
|
||||
null,
|
||||
TrackPoint.Type.TRACKPOINT,
|
||||
Position.of(parsedTime.toInstant()),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
double latitudeParsed;
|
||||
|
||||
Reference in New Issue
Block a user