mirror of
https://github.com/FossifyOrg/File-Manager.git
synced 2026-10-25 16:18:40 -04:00
catch exceptions at sharing files
This commit is contained in:
1 parent
5f39a70be3
commit
535b9ce33e
1 file changed
+6
-1
@@ -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