merge heads

This commit is contained in:
Jimmy Shih
2013-09-04 13:45:40 -07:00
15 changed files with 311 additions and 74 deletions
@@ -242,8 +242,12 @@ abstract class AbstractFileTrackImporter extends DefaultHandler implements Track
// No more track points. Ignore the rest of the waypoints.
return;
}
trackTripStatisticstrackUpdater.addLocation(trackPoint, recordingDistanceInterval);
markerTripStatisticsUpdater.addLocation(trackPoint, recordingDistanceInterval);
trackTripStatisticstrackUpdater.addLocation(trackPoint, recordingDistanceInterval,
PreferencesUtils.getInt(context, R.string.stats_weight_key,
PreferencesUtils.STATS_WEIGHT_DEFAULT));
markerTripStatisticsUpdater.addLocation(trackPoint, recordingDistanceInterval,
PreferencesUtils.getInt(context, R.string.stats_weight_key,
PreferencesUtils.STATS_WEIGHT_DEFAULT));
}
if (waypoint.getLocation().getTime() > trackPoint.getTime()) {
trackPoint = null;
@@ -533,7 +537,9 @@ abstract class AbstractFileTrackImporter extends DefaultHandler implements Track
trackData.tripStatisticsUpdater = new TripStatisticsUpdater(
location.getTime() != -1L ? location.getTime() : trackData.importTime);
}
trackData.tripStatisticsUpdater.addLocation(location, recordingDistanceInterval);
trackData.tripStatisticsUpdater.addLocation(location, recordingDistanceInterval,
PreferencesUtils.getInt(context, R.string.stats_weight_key,
PreferencesUtils.STATS_WEIGHT_DEFAULT));
trackData.bufferedLocations[trackData.numBufferedLocations] = location;
trackData.numBufferedLocations++;
@@ -277,7 +277,8 @@ public class SendMapsAsyncTask extends AbstractSendAsyncTask {
sentStartMarker = true;
}
tripStatisticsUpdater.addLocation(location, recordingDistanceInterval);
tripStatisticsUpdater.addLocation(location, recordingDistanceInterval, PreferencesUtils
.getInt(context, R.string.stats_weight_key, PreferencesUtils.STATS_WEIGHT_DEFAULT));
if (i % elevationSamplingFrequency == 0) {
distances.add(tripStatisticsUpdater.getTripStatistics().getTotalDistance());
elevations.add(tripStatisticsUpdater.getSmoothedElevation());