catch exceptions at sharing files
This commit is contained in:
parent
5f39a70be3
commit
535b9ce33e
1 changed files with 6 additions and 1 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue