From 8f85b5da2fedc2b7b71b28a8b065e6a8ae1f3a7d Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 10 Nov 2016 20:50:38 +0100 Subject: [PATCH] do not show the permissions dialog to prekitkat devices --- app/src/main/java/com/simplemobiletools/gallery/Utils.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/gallery/Utils.kt b/app/src/main/java/com/simplemobiletools/gallery/Utils.kt index ba4fb57d9..0ef3c93fe 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/Utils.kt +++ b/app/src/main/java/com/simplemobiletools/gallery/Utils.kt @@ -171,9 +171,8 @@ class Utils { } fun isShowingWritePermissions(activity: Activity, file: File): Boolean { - return if ((needsStupidWritePermissions(activity, file.absolutePath) && - !file.canWrite()) || - Config.newInstance(activity).treeUri.isEmpty()) { + return if ((needsStupidWritePermissions(activity, file.absolutePath) && !file.canWrite()) || + (isKitkat() && Config.newInstance(activity).treeUri.isEmpty())) { WritePermissionDialog(activity, object : WritePermissionDialog.OnWritePermissionListener { override fun onConfirmed() { val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE)