simplify the SD card permission check at some activities
This commit is contained in:
parent
609e341b81
commit
f372d46b51
2 changed files with 2 additions and 2 deletions
|
@ -268,7 +268,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun deleteFiles(files: ArrayList<File>) {
|
override fun deleteFiles(files: ArrayList<File>) {
|
||||||
if (needsStupidWritePermissions(files[0].path) && isShowingPermDialog(files[0])) {
|
if (isShowingPermDialog(files[0])) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -319,7 +319,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
private fun deleteFile() {
|
private fun deleteFile() {
|
||||||
val file = File(mMedia[mPos].path)
|
val file = File(mMedia[mPos].path)
|
||||||
if (needsStupidWritePermissions(file.path) && isShowingPermDialog(file)) {
|
if (isShowingPermDialog(file)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue