forked from upstream-mirrors/OpenTracks
Fixing leftovers from the merge
This commit is contained in:
@@ -83,6 +83,11 @@ public class SaveActivity extends Activity {
|
|||||||
shareFile = intent.getBooleanExtra(EXTRA_SHARE_FILE, false);
|
shareFile = intent.getBooleanExtra(EXTRA_SHARE_FILE, false);
|
||||||
|
|
||||||
writer = TrackWriterFactory.newWriter(this, providerUtils, trackId, format);
|
writer = TrackWriterFactory.newWriter(this, providerUtils, trackId, format);
|
||||||
|
if (writer == null) {
|
||||||
|
Log.e(TAG, "Unable to build writer");
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (shareFile) {
|
if (shareFile) {
|
||||||
// If the file is for sending, save it to a temporary location instead.
|
// If the file is for sending, save it to a temporary location instead.
|
||||||
|
|||||||
@@ -223,8 +223,12 @@ public class SendActivity extends Activity implements ProgressIndicator {
|
|||||||
// Update the map id for this track:
|
// Update the map id for this track:
|
||||||
try {
|
try {
|
||||||
Track track = providerUtils.getTrack(sendTrackId);
|
Track track = providerUtils.getTrack(sendTrackId);
|
||||||
track.setMapId(mapId);
|
if (track != null) {
|
||||||
providerUtils.updateTrack(track);
|
track.setMapId(mapId);
|
||||||
|
providerUtils.updateTrack(track);
|
||||||
|
} else {
|
||||||
|
Log.w(TAG, "Updating map id failed.");
|
||||||
|
}
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
// If that fails whatever reasons we'll just log an error, but
|
// If that fails whatever reasons we'll just log an error, but
|
||||||
// continue.
|
// continue.
|
||||||
@@ -280,8 +284,12 @@ public class SendActivity extends Activity implements ProgressIndicator {
|
|||||||
// Update the table id for this track:
|
// Update the table id for this track:
|
||||||
try {
|
try {
|
||||||
Track track = providerUtils.getTrack(sendTrackId);
|
Track track = providerUtils.getTrack(sendTrackId);
|
||||||
track.setTableId(tableId);
|
if (track != null) {
|
||||||
providerUtils.updateTrack(track);
|
track.setTableId(tableId);
|
||||||
|
providerUtils.updateTrack(track);
|
||||||
|
} else {
|
||||||
|
Log.w(TAG, "Updating table id failed.");
|
||||||
|
}
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
// If that fails whatever reasons we'll just log an error, but
|
// If that fails whatever reasons we'll just log an error, but
|
||||||
// continue.
|
// continue.
|
||||||
|
|||||||
Reference in New Issue
Block a user