Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisguse committed Aug 8, 2023
1 parent 2b4ea0d commit a1d351e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void stop() {

Track.Id startNewTrack() {
TrackPoint segmentStartTrackPoint = trackPointCreator.createSegmentStartManual();
// Create new track

ZoneOffset zoneOffset = ZoneOffset.systemDefault().getRules().getOffset(segmentStartTrackPoint.getTime());
Track track = new Track(zoneOffset);
trackId = contentProviderUtils.insertTrack(track);
Expand All @@ -89,7 +89,6 @@ Track.Id startNewTrack() {
track.setActivityTypeLocalized(activityTypeLocalized);
track.setActivityType(ActivityType.findByLocalizedString(context, activityTypeLocalized));
track.setTrackStatistics(trackStatisticsUpdater.getTrackStatistics());
//TODO Pass TrackPoint
track.setName(TrackNameUtils.getTrackName(context, trackId, track.getStartTime()));
contentProviderUtils.updateTrack(track);

Expand All @@ -115,7 +114,7 @@ boolean resumeExistingTrack(@NonNull Track.Id resumeTrackId) {
return true;
}

void end() {
void endCurrentTrack() {
TrackPoint segmentEnd = trackPointCreator.createSegmentEnd();
insertTrackPoint(segmentEnd, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void endCurrentTrack() {
// Set recording status
updateRecordingStatus(STATUS_DEFAULT);

trackRecordingManager.end();
trackRecordingManager.endCurrentTrack();
endRecording();

stopSelf();
Expand Down

0 comments on commit a1d351e

Please sign in to comment.