forked from upstream-mirrors/OpenTracks
Waypoint requires a non-null location.
Remove setLocation() from Waypoint and TrackPoint.
This commit is contained in:
@@ -20,6 +20,7 @@ import android.location.Location;
|
||||
import android.net.Uri;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
/**
|
||||
* A waypoint.
|
||||
@@ -40,10 +41,15 @@ public final class Waypoint {
|
||||
private Location location = null;
|
||||
private String photoUrl = "";
|
||||
|
||||
@VisibleForTesting
|
||||
public Waypoint() {
|
||||
}
|
||||
|
||||
public Waypoint(String name, String description, String category, String icon, long trackId, double length, long duration, Location location, String photoUrl) {
|
||||
public Waypoint(Location location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public Waypoint(String name, String description, String category, String icon, long trackId, double length, long duration, @NonNull Location location, String photoUrl) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.category = category;
|
||||
@@ -124,10 +130,6 @@ public final class Waypoint {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(@NonNull Location location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getPhotoUrl() {
|
||||
return photoUrl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user