mirror of
https://github.com/FossifyOrg/File-Manager.git
synced 2026-02-25 19:19:59 -05:00
catch exceptions at sharing files
This commit is contained in:
@@ -169,7 +169,12 @@ class ItemsAdapter(val activity: SimpleActivity, var mItems: MutableList<FileDir
|
||||
}
|
||||
type = getMimeType(uris)
|
||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
activity.startActivity(Intent.createChooser(this, shareTitle))
|
||||
|
||||
try {
|
||||
activity.startActivity(Intent.createChooser(this, shareTitle))
|
||||
} catch (exception: Exception) {
|
||||
activity.showErrorToast(exception.cause.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user