Bug fix, only update calorie in statistics markers

This commit is contained in:
Jimmy Shih
2013-11-20 10:58:44 -08:00
parent 79f974ee2b
commit 33fb24c5e5
@@ -233,10 +233,11 @@ public class CalorieUtils {
* Yes, this will skip the first waypoint and that is intentional as the
* first waypoint holds the stats for the track.
*/
while (cursor.moveToNext()) {
Waypoint waypoint = myTracksProviderUtils.createWaypoint(cursor);
Waypoint waypoint = getNextStatisticsWaypoint(myTracksProviderUtils, cursor);
while (waypoint != null) {
waypoint.getTripStatistics().setCalorie(0);
myTracksProviderUtils.updateWaypoint(waypoint);
waypoint = getNextStatisticsWaypoint(myTracksProviderUtils, cursor);
}
}
} finally {