This commit is contained in:
Dennis Guse
2020-04-13 19:15:13 +02:00
parent 6a1fada22f
commit 1a86db0a8b
6 changed files with 86 additions and 134 deletions
@@ -41,6 +41,7 @@ public class Track {
private TrackStatistics trackStatistics = new TrackStatistics();
// Location points (which may not have been loaded)
@Deprecated //TODO Is only used by tests
private List<TrackPoint> trackPoints = new ArrayList<>();
public Track() {
@@ -94,15 +95,19 @@ public class Track {
this.trackStatistics = trackStatistics;
}
@Deprecated
@VisibleForTesting
public void addTrackPoint(TrackPoint location) {
trackPoints.add(location);
}
@VisibleForTesting
@Deprecated //TODO Only used for testing; can be removed?
public List<TrackPoint> getTrackPoints() {
return trackPoints;
}
@Deprecated //TODO Remove
public void setTrackPoints(ArrayList<TrackPoint> trackPoints) {
this.trackPoints = trackPoints;
}
@@ -38,14 +38,15 @@ public final class Waypoint {
private long trackId = -1L;
private double length = 0.0;
private long duration = 0;
private Location location = null;
private Location location;
private String photoUrl = "";
@VisibleForTesting
public Waypoint() {
public Waypoint(@NonNull TrackPoint trackPoint) {
this.location = trackPoint.getLocation();
}
public Waypoint(Location location) {
public Waypoint(@NonNull Location location) {
this.location = location;
}