Merge heads

This commit is contained in:
youtaol
2012-06-11 10:34:48 +08:00
parent 4bf87acb80
commit 56475a943f
55 changed files with 232 additions and 196 deletions
@@ -76,6 +76,13 @@ public interface MyTracksProviderUtils {
*/
boolean updateWaypoint(Waypoint waypoint);
/**
* Finds the first recorded location from the location provider.
*
* @return the first location, or null if no locations available
*/
Location getFirstLocation();
/**
* Finds the last recorded location from the location provider.
*
@@ -653,6 +653,11 @@ public class MyTracksProviderUtilsImpl implements MyTracksProviderUtils {
return null;
}
@Override
public Location getFirstLocation() {
return findLocationBy("_id=(select min(_id) from trackpoints)");
}
@Override
public Location getLastLocation() {
return findLocationBy("_id=(select max(_id) from trackpoints)");