simplify the SD card permission check at some activities

This commit is contained in:
tibbi 2017-02-27 19:20:19 +01:00
parent 609e341b81
commit f372d46b51
2 changed files with 2 additions and 2 deletions

View file

@ -268,7 +268,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
}
override fun deleteFiles(files: ArrayList<File>) {
if (needsStupidWritePermissions(files[0].path) && isShowingPermDialog(files[0])) {
if (isShowingPermDialog(files[0])) {
return
}

View file

@ -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
}