Bugfix: pausing should only insert a non-null lastTrackpoint.
Found by Google Play Pre-Launch report.
@@ -482,8 +482,9 @@ public class TrackRecordingService extends Service {
// Update database
Track track = contentProviderUtils.getTrack(recordingTrackId);
if (track != null) {
+ if (lastTrackPoint != null) {
insertTrackPointIfNewer(track, lastTrackPoint);
-
+ }
insertTrackPoint(track, TrackPoint.createPause());
}
