From 3e3f883c1f81da8264001313c7fab50475054d92 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 20 Mar 2020 19:20:37 +0100 Subject: [PATCH] do not require the Storage permission at opening third party intents --- .../simplemobiletools/draw/pro/activities/MainActivity.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt index 3306d69..06adf31 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt @@ -215,10 +215,7 @@ class MainActivity : SimpleActivity(), CanvasListener { } if (intent?.action == Intent.ACTION_VIEW && intent.data != null) { - getStoragePermission { - val path = getRealPathFromURI(intent.data!!) ?: intent.dataString - openPath(path!!) - } + tryOpenUri(intent.data!!, intent) } if (intent?.action == MediaStore.ACTION_IMAGE_CAPTURE) {