From d80a1bd185ef845d8a64dec88c80100828f819da Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 10 Nov 2016 21:22:02 +0100 Subject: [PATCH] remove the file.canWrite check --- app/src/main/java/com/simplemobiletools/gallery/Utils.kt | 3 +-- .../simplemobiletools/gallery/activities/MediaActivity.java | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/gallery/Utils.kt b/app/src/main/java/com/simplemobiletools/gallery/Utils.kt index 0ef3c93fe..f4bda57b9 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/Utils.kt +++ b/app/src/main/java/com/simplemobiletools/gallery/Utils.kt @@ -171,8 +171,7 @@ class Utils { } fun isShowingWritePermissions(activity: Activity, file: File): Boolean { - return if ((needsStupidWritePermissions(activity, file.absolutePath) && !file.canWrite()) || - (isKitkat() && Config.newInstance(activity).treeUri.isEmpty())) { + return if ((needsStupidWritePermissions(activity, file.absolutePath) && Config.newInstance(activity).treeUri.isEmpty())) { WritePermissionDialog(activity, object : WritePermissionDialog.OnWritePermissionListener { override fun onConfirmed() { val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE) diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java index 0609030f6..d2a52089d 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MediaActivity.java @@ -414,9 +414,6 @@ public class MediaActivity extends SimpleActivity } private void displayCopyDialog() { - if (Utils.Companion.isShowingWritePermissions(this, new File(mPath))) - return; - final List files = new ArrayList<>(); final SparseBooleanArray items = mGridView.getCheckedItemPositions();