forked from upstream-mirrors/OpenTracks
Merge heads
This commit is contained in:
@@ -252,11 +252,6 @@ public interface MyTracksProviderUtils {
|
||||
*/
|
||||
public Location getLastValidTrackPoint(long trackId);
|
||||
|
||||
/**
|
||||
* Gets the last valid location recorded. Returns null if it doesn't exist.
|
||||
*/
|
||||
public Location getLastValidTrackPoint();
|
||||
|
||||
/**
|
||||
* Creates a location cursor. The caller owns the returned cursor and is
|
||||
* responsible for closing it.
|
||||
|
||||
+3
-11
@@ -238,9 +238,9 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
||||
public Track getLastTrack() {
|
||||
Cursor cursor = null;
|
||||
try {
|
||||
String selection = TracksColumns._ID + "=(select max(" + TracksColumns._ID + ") from "
|
||||
+ TracksColumns.TABLE_NAME + ")";
|
||||
cursor = getTrackCursor(null, selection, null, TracksColumns._ID);
|
||||
// Using the same order as shown in the track list
|
||||
cursor = getTrackCursor(null, null, null,
|
||||
TracksColumns.SHAREDWITHME + " ASC, " + TracksColumns.STARTTIME + " DESC");
|
||||
if (cursor != null && cursor.moveToNext()) {
|
||||
return createTrack(cursor);
|
||||
}
|
||||
@@ -816,14 +816,6 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
|
||||
return findTrackPointBy(selection, selectionArgs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getLastValidTrackPoint() {
|
||||
String selection = TrackPointsColumns._ID + "=(select max(" + TrackPointsColumns._ID + ") from "
|
||||
+ TrackPointsColumns.TABLE_NAME + " WHERE " + TrackPointsColumns.LATITUDE + "<="
|
||||
+ MAX_LATITUDE + ")";
|
||||
return findTrackPointBy(selection, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor getTrackPointCursor(
|
||||
long trackId, long startTrackPointId, int maxLocations, boolean descending) {
|
||||
|
||||
Reference in New Issue
Block a user