forked from upstream-mirrors/OpenTracks
TrackRecordingActivity keeps Track.Id value instead of track object. Every time the track is needed it gets it. Fixes #435.
This commit is contained in:
@@ -35,17 +35,22 @@ public class TrackUtils {
|
||||
}
|
||||
|
||||
public static void updateTrack(Context context, Track track, String name, String category, String description, ContentProviderUtils contentProviderUtils) {
|
||||
boolean update = false;
|
||||
if (name != null) {
|
||||
track.setName(name);
|
||||
update = true;
|
||||
}
|
||||
if (category != null) {
|
||||
track.setCategory(category);
|
||||
track.setIcon(TrackIconUtils.getIconValue(context, category));
|
||||
update = true;
|
||||
}
|
||||
|
||||
if (description != null) {
|
||||
track.setDescription(description);
|
||||
update = true;
|
||||
}
|
||||
if (update) {
|
||||
contentProviderUtils.updateTrack(track);
|
||||
}
|
||||
contentProviderUtils.updateTrack(track);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user