forked from upstream-mirrors/OpenTracks
Fixed (some) TrackRecordingServiceTests.
This commit is contained in:
@@ -27,13 +27,14 @@ import de.dennisguse.opentracks.content.Waypoint.WaypointType;
|
||||
*/
|
||||
public class WaypointCreationRequest implements Parcelable {
|
||||
|
||||
public final static WaypointCreationRequest DEFAULT_WAYPOINT = new WaypointCreationRequest(
|
||||
WaypointType.WAYPOINT, false);
|
||||
public final static WaypointCreationRequest DEFAULT_STATISTICS = new WaypointCreationRequest(
|
||||
WaypointType.STATISTICS, false);
|
||||
public final static WaypointCreationRequest DEFAULT_START_TRACK = new WaypointCreationRequest(
|
||||
WaypointType.STATISTICS, true);
|
||||
public final static WaypointCreationRequest DEFAULT_WAYPOINT = new WaypointCreationRequest(WaypointType.WAYPOINT, false);
|
||||
|
||||
public final static WaypointCreationRequest DEFAULT_STATISTICS = new WaypointCreationRequest(WaypointType.STATISTICS, false);
|
||||
|
||||
public final static WaypointCreationRequest DEFAULT_START_TRACK = new WaypointCreationRequest(WaypointType.STATISTICS, true);
|
||||
|
||||
public static final Creator CREATOR = new Creator();
|
||||
|
||||
private WaypointType type;
|
||||
// true if this marker contains the track statistics
|
||||
private boolean isTrackStatistics;
|
||||
@@ -47,8 +48,7 @@ public class WaypointCreationRequest implements Parcelable {
|
||||
this(type, isTrackStatistics, null, null, null, null, null);
|
||||
}
|
||||
|
||||
public WaypointCreationRequest(WaypointType type, boolean isTrackStatistics, String name,
|
||||
String category, String description, String iconUrl, String photoUrl) {
|
||||
public WaypointCreationRequest(WaypointType type, boolean isTrackStatistics, String name, String category, String description, String iconUrl, String photoUrl) {
|
||||
this.type = type;
|
||||
this.isTrackStatistics = isTrackStatistics;
|
||||
this.name = name;
|
||||
|
||||
@@ -88,6 +88,8 @@ public interface ITrackRecordingService {
|
||||
long insertWaypoint(WaypointCreationRequest request);
|
||||
|
||||
/**
|
||||
* ONLY FOR TESTING
|
||||
*
|
||||
* Inserts a track point in the current recording track.
|
||||
* <p>
|
||||
* When recording a track, GPS locations are automatically inserted. This is used for
|
||||
|
||||
@@ -1097,9 +1097,10 @@ public class TrackRecordingService extends Service {
|
||||
return trackRecordingService.insertWaypoint(waypointCreationRequest);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@Override
|
||||
public void insertTrackPoint(Location location) {
|
||||
//TODO trackRecordingService.locationListener.onLocationChanged(location);
|
||||
trackRecordingService.onLocationChangedAsync(location);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user