catch an exception that, may come up, when the default system file picker is disabled (see #70 & #81)
This commit is contained in:
parent
5d041e0aeb
commit
0bc161396f
1 changed files with 6 additions and 1 deletions
|
@ -182,7 +182,12 @@ class TrackFragment : Fragment(), RenameTrackDialog.RenameTrackListener, YesNoDi
|
||||||
putExtra(Intent.EXTRA_TITLE, FileHelper.getGpxFileName(track))
|
putExtra(Intent.EXTRA_TITLE, FileHelper.getGpxFileName(track))
|
||||||
}
|
}
|
||||||
// file gets saved in onActivityResult
|
// file gets saved in onActivityResult
|
||||||
startActivityForResult(intent, Keys.REQUEST_SAVE_GPX)
|
try {
|
||||||
|
startActivityForResult(intent, Keys.REQUEST_SAVE_GPX)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
LogHelper.e(TAG, "Unable to save GPX. ")
|
||||||
|
Toast.makeText(activity as Context, R.string.toast_message_install_file_helper, Toast.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue