do not grant write_uri_permission at get_content result intent

This commit is contained in:
tibbi 2017-11-06 16:45:40 +01:00
parent 6f53df863a
commit 09ff1779e8

View File

@ -478,7 +478,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID) val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID)
val type = path.getMimeTypeFromPath() val type = path.getMimeTypeFromPath()
resultIntent.setDataAndTypeAndNormalize(uri, type) resultIntent.setDataAndTypeAndNormalize(uri, type)
resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
} }
private fun itemClicked(path: String) { private fun itemClicked(path: String) {