mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-11 21:43:05 +02:00
creates a segment like pause/continue.
This commit is contained in:
@@ -352,8 +352,9 @@ public class TrackRecordingService extends Service {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resumes the track identified by trackId.
|
* Resumes the track identified by trackId.
|
||||||
|
* It results in a pause/continue.
|
||||||
*
|
*
|
||||||
* @param trackId
|
* @param trackId the id of the track to be resumed.
|
||||||
*/
|
*/
|
||||||
void resumeTrack(long trackId) {
|
void resumeTrack(long trackId) {
|
||||||
Track track = contentProviderUtils.getTrack(trackId);
|
Track track = contentProviderUtils.getTrack(trackId);
|
||||||
@@ -362,10 +363,14 @@ public class TrackRecordingService extends Service {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sync the real time setting the stop time with current time.
|
||||||
track.getTripStatistics().setStopTime(System.currentTimeMillis());
|
track.getTripStatistics().setStopTime(System.currentTimeMillis());
|
||||||
trackTripStatisticsUpdater = new TripStatisticsUpdater(track.getTripStatistics());
|
trackTripStatisticsUpdater = new TripStatisticsUpdater(track.getTripStatistics());
|
||||||
|
|
||||||
// Update shared preferences
|
insertTrackPoint(track, TrackPoint.createPause(), null);
|
||||||
|
insertTrackPoint(track, TrackPoint.createResume(), null);
|
||||||
|
|
||||||
|
// Update shared preferences.
|
||||||
updateRecordingState(trackId, false);
|
updateRecordingState(trackId, false);
|
||||||
|
|
||||||
startRecording();
|
startRecording();
|
||||||
|
|||||||
Reference in New Issue
Block a user