From fdcad15b6f6bfd4f4268136a7955ba973eb1880d Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 26 Feb 2019 15:39:14 +0100 Subject: [PATCH] fix #1285, properly handle some image picker intents --- .../simplemobiletools/gallery/pro/activities/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 5ccc5d1af..2141f70f0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -694,7 +694,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { var resultUri: Uri? = null if (mIsThirdPartyIntent) { when { - intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true -> { + intent.extras?.containsKey(MediaStore.EXTRA_OUTPUT) == true && intent.flags and Intent.FLAG_GRANT_WRITE_URI_PERMISSION != 0 -> { resultUri = fillExtraOutput(resultData) } resultData.extras?.containsKey(PICKED_PATHS) == true -> fillPickedPaths(resultData, resultIntent)