forked from upstream-mirrors/OpenTracks
Removed Waypoint default constructor used by testing.
This avoids a null check for Waypoint.getLocation().
This commit is contained in:
@@ -16,11 +16,6 @@
|
||||
|
||||
package de.dennisguse.opentracks.content.data;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.dennisguse.opentracks.stats.TrackStatistics;
|
||||
|
||||
/**
|
||||
@@ -40,10 +35,6 @@ 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,21 +85,4 @@ public class Track {
|
||||
public void setTrackStatistics(TrackStatistics trackStatistics) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -638,6 +638,7 @@ public class ContentProviderUtils {
|
||||
* @param trackId the trackPoints id
|
||||
* @return the number of trackPoints inserted
|
||||
*/
|
||||
//TODO Only used for testing and file import; might be better to replace it; in any case remove length.
|
||||
public int bulkInsertTrackPoint(TrackPoint[] trackPoints, int length, long trackId) {
|
||||
if (length == -1) {
|
||||
length = trackPoints.length;
|
||||
|
||||
Reference in New Issue
Block a user