diff --git a/src/main/java/de/dennisguse/opentracks/services/TrackRecordingManager.java b/src/main/java/de/dennisguse/opentracks/services/TrackRecordingManager.java index d897572ecf..75cd8e1172 100644 --- a/src/main/java/de/dennisguse/opentracks/services/TrackRecordingManager.java +++ b/src/main/java/de/dennisguse/opentracks/services/TrackRecordingManager.java @@ -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); @@ -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); @@ -115,7 +114,7 @@ boolean resumeExistingTrack(@NonNull Track.Id resumeTrackId) { return true; } - void end() { + void endCurrentTrack() { TrackPoint segmentEnd = trackPointCreator.createSegmentEnd(); insertTrackPoint(segmentEnd, true); diff --git a/src/main/java/de/dennisguse/opentracks/services/TrackRecordingService.java b/src/main/java/de/dennisguse/opentracks/services/TrackRecordingService.java index 751fd6dc38..2e3cbec47a 100644 --- a/src/main/java/de/dennisguse/opentracks/services/TrackRecordingService.java +++ b/src/main/java/de/dennisguse/opentracks/services/TrackRecordingService.java @@ -209,7 +209,7 @@ public void endCurrentTrack() { // Set recording status updateRecordingStatus(STATUS_DEFAULT); - trackRecordingManager.end(); + trackRecordingManager.endCurrentTrack(); endRecording(); stopSelf();