From f372d46b51437126f91be2937636f26917a074cd Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 27 Feb 2017 19:20:19 +0100 Subject: [PATCH] simplify the SD card permission check at some activities --- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 2 +- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 858fd52e4..107d77808 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -268,7 +268,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } override fun deleteFiles(files: ArrayList) { - if (needsStupidWritePermissions(files[0].path) && isShowingPermDialog(files[0])) { + if (isShowingPermDialog(files[0])) { return } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index e65ee5bec..e0a00ca84 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -319,7 +319,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun deleteFile() { val file = File(mMedia[mPos].path) - if (needsStupidWritePermissions(file.path) && isShowingPermDialog(file)) { + if (isShowingPermDialog(file)) { return }