catch exceptions at sharing files

This commit is contained in:
tibbi 2017-09-03 15:30:59 +02:00
parent 5f39a70be3
commit 535b9ce33e

View file

@ -169,7 +169,12 @@ class ItemsAdapter(val activity: SimpleActivity, var mItems: MutableList<FileDir
}
type = getMimeType(uris)
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
try {
activity.startActivity(Intent.createChooser(this, shareTitle))
} catch (exception: Exception) {
activity.showErrorToast(exception.cause.toString())
}
}
}