mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-05 19:13:07 +02:00
TrackDetailActivity starts an actual recording and a stopped recording can be resumed. Fixes #103 and #11.
This commit is contained in:
@@ -96,6 +96,16 @@ public class TripStatisticsUpdater {
|
||||
currentSegment = init(startTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new trip statistics updater with a trip statistics already existed.
|
||||
*
|
||||
* @param tripStatistics a trip statistics.
|
||||
*/
|
||||
public TripStatisticsUpdater(TripStatistics tripStatistics) {
|
||||
this.tripStatistics = tripStatistics;
|
||||
currentSegment = init(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public void updateTime(long time) {
|
||||
currentSegment.setStopTime(time);
|
||||
currentSegment.setTotalTime(time - currentSegment.getStartTime());
|
||||
|
||||
Reference in New Issue
Block a user