forked from upstream-mirrors/OpenTracks
Use TrackPoint instead of Location (and omit casting).
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package de.dennisguse.opentracks.content.data;
|
||||
|
||||
import android.location.Location;
|
||||
import android.location.LocationManager;
|
||||
|
||||
import de.dennisguse.opentracks.content.sensor.SensorDataSet;
|
||||
|
||||
@@ -24,8 +25,25 @@ import de.dennisguse.opentracks.content.sensor.SensorDataSet;
|
||||
*
|
||||
* @author Sandor Dornbush
|
||||
*/
|
||||
//TODO Check if we can drop inheritance from Location and use attributes instead.
|
||||
public class TrackPoint extends Location {
|
||||
|
||||
public static TrackPoint createPause() {
|
||||
TrackPoint pause = new TrackPoint(LocationManager.GPS_PROVIDER);
|
||||
pause.setLongitude(0);
|
||||
pause.setLatitude(TrackPointsColumns.PAUSE_LATITUDE);
|
||||
pause.setTime(System.currentTimeMillis());
|
||||
return pause;
|
||||
}
|
||||
|
||||
public static TrackPoint createResume() {
|
||||
TrackPoint resume = new TrackPoint(LocationManager.GPS_PROVIDER);
|
||||
resume.setLongitude(0);
|
||||
resume.setLatitude(TrackPointsColumns.RESUME_LATITUDE);
|
||||
resume.setTime(System.currentTimeMillis());
|
||||
return resume;
|
||||
}
|
||||
|
||||
private SensorDataSet sensorDataSet = null;
|
||||
|
||||
public TrackPoint(Location location, SensorDataSet sensorDataSet) {
|
||||
|
||||
Reference in New Issue
Block a user