simplify the SD card permission check at some activities
This commit is contained in:
parent
609e341b81
commit
f372d46b51
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue