Bug fix: set the final track name when the track ends

This commit is contained in:
Jimmy Shih
2013-12-05 16:25:05 -08:00
parent 3d0846bec6
commit 07edfde08d
2 changed files with 8 additions and 7 deletions
@@ -771,7 +771,14 @@ public class TrackRecordingService extends Service {
// Update the recording track time
updateRecordingTrack(track, myTracksProviderUtils.getLastTrackPointId(trackId), false);
}
}
String trackName = TrackNameUtils.getTrackName(
this, -1L, -1L, myTracksProviderUtils.getFirstValidTrackPoint(trackId));
if (trackName != null) {
track.setName(trackName);
myTracksProviderUtils.updateTrack(track);
}
if (track.getCategory().equals(PreferencesUtils.DEFAULT_ACTIVITY_DEFAULT)) {
int activityRecognitionType = PreferencesUtils.getInt(this,