mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Removing no longer used provider utility methods
This commit is contained in:
@@ -240,14 +240,6 @@ public interface MyTracksProviderUtils {
|
||||
*/
|
||||
Uri insertWaypoint(Waypoint waypoint);
|
||||
|
||||
/**
|
||||
* Inserts a track including its track points in the provider.
|
||||
*
|
||||
* @param track the track to insert
|
||||
* @return the content provider URI for the inserted track
|
||||
*/
|
||||
Uri insertTrackAndTrackPoints(Track track);
|
||||
|
||||
/**
|
||||
* Tests if a track with given id exists.
|
||||
*
|
||||
|
||||
@@ -908,31 +908,6 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
||||
createContentValues(waypoint));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Uri insertTrackAndTrackPoints(Track track) {
|
||||
// Insert the track right away to have its ID
|
||||
Uri trackUri = insertTrack(track);
|
||||
long trackId = Long.parseLong(trackUri.getLastPathSegment());
|
||||
track.setId(trackId);
|
||||
|
||||
// Insert all the points (associated with the track ID)
|
||||
boolean firstPoint = true;
|
||||
long pointId = -1;
|
||||
for (Location location : track.getLocations()) {
|
||||
Uri pointUri = insertTrackPoint(location, trackId);
|
||||
pointId = Long.parseLong(pointUri.getLastPathSegment());
|
||||
if (firstPoint) {
|
||||
track.setStartId(pointId);
|
||||
firstPoint = false;
|
||||
}
|
||||
}
|
||||
track.setStopId(pointId);
|
||||
|
||||
// Update the track with the start and end point IDs
|
||||
updateTrack(track);
|
||||
return trackUri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean trackExists(long id) {
|
||||
Cursor cursor = null;
|
||||
|
||||
Reference in New Issue
Block a user