Merge heads

This commit is contained in:
youtaol
2013-04-17 19:51:58 +08:00
parent 3d6f9a1a2d
commit d66bf7b395
93 changed files with 840 additions and 734 deletions
@@ -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.
@@ -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) {