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 untrusted user: hardcoresushi
GPG Key ID: AFE384344A45E13A

View File

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