Add FLAG_GRANT_READ_URI_PERMISSION for external opens

This commit is contained in:
Matéo Duparc 2022-09-13 12:41:14 +02:00
parent 2d19895e6d
commit 11cc15536f
Signed by: hardcoresushi
GPG Key ID: AFE384344A45E13A
1 changed files with 1 additions and 0 deletions

View File

@ -89,6 +89,7 @@ object ExternalProvider {
val result = exportFile(activity, encryptedVolume, file_path, null)
return if (result.first != null) {
Intent(Intent.ACTION_VIEW).apply {
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
setDataAndType(result.first, result.second)
}
} else {