mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-01-30 18:24:52 +01:00
catch exceptions at sharing files
This commit is contained in:
parent
5f39a70be3
commit
535b9ce33e
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user