catch an exception that, may come up, when the default system file picker is disabled (see #70 & #81)

This commit is contained in:
y20k 2020-10-14 10:24:17 +02:00
parent 5d041e0aeb
commit 0bc161396f
No known key found for this signature in database
GPG key ID: 824D4259F41FAFF6

View file

@ -182,7 +182,12 @@ class TrackFragment : Fragment(), RenameTrackDialog.RenameTrackListener, YesNoDi
putExtra(Intent.EXTRA_TITLE, FileHelper.getGpxFileName(track))
}
// 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()
}
}