forked from upstream-mirrors/OpenTracks
After user edit the track. Update recorded track statistics immediately and update recording track statistics in track recording service.
Change some code style.
This commit is contained in:
+3
-3
@@ -226,7 +226,7 @@ public class TripStatisticsUpdaterTest extends TestCase {
|
||||
startTime + (timeOffset + i) * TEN_SECONDS);
|
||||
tripStatisticsUpdater.addLocation(location,
|
||||
PreferencesUtils.RECORDING_DISTANCE_INTERVAL_DEFAULT, ActivityType.FOOT,
|
||||
PreferencesUtils.STATS_WEIGHT_DEFAULT);
|
||||
PreferencesUtils.STATS_WEIGHT_DEFAULT, true);
|
||||
tripStatistics = tripStatisticsUpdater.getTripStatistics();
|
||||
|
||||
assertEquals((timeOffset + i) * TEN_SECONDS, tripStatistics.getTotalTime());
|
||||
@@ -273,7 +273,7 @@ public class TripStatisticsUpdaterTest extends TestCase {
|
||||
locationOffset, locationOffset * .001, 0, startTime + (i + timeOffset) * TEN_SECONDS);
|
||||
tripStatisticsUpdater.addLocation(location,
|
||||
PreferencesUtils.RECORDING_DISTANCE_INTERVAL_DEFAULT, ActivityType.FOOT,
|
||||
PreferencesUtils.STATS_WEIGHT_DEFAULT);
|
||||
PreferencesUtils.STATS_WEIGHT_DEFAULT, false);
|
||||
|
||||
tripStatistics = tripStatisticsUpdater.getTripStatistics();
|
||||
assertEquals((i + timeOffset) * TEN_SECONDS, tripStatistics.getTotalTime());
|
||||
@@ -311,7 +311,7 @@ public class TripStatisticsUpdaterTest extends TestCase {
|
||||
startTime + (timeOffset + i) * TEN_SECONDS);
|
||||
tripStatisticsUpdater.addLocation(location,
|
||||
PreferencesUtils.RECORDING_DISTANCE_INTERVAL_DEFAULT, ActivityType.FOOT,
|
||||
PreferencesUtils.STATS_WEIGHT_DEFAULT);
|
||||
PreferencesUtils.STATS_WEIGHT_DEFAULT, true);
|
||||
tripStatistics = tripStatisticsUpdater.getTripStatistics();
|
||||
|
||||
assertTrue(tripStatistics.getMovingTime() <= tripStatistics.getTotalTime());
|
||||
|
||||
Reference in New Issue
Block a user