delete file from mediastore on ViewPagerActivity in the background
This commit is contained in:
parent
2ca0bded2d
commit
42faaf51c1
1 changed files with 4 additions and 2 deletions
|
@ -181,8 +181,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
val file = File(mPath)
|
val file = File(mPath)
|
||||||
if (!file.exists()) {
|
if (!file.exists() && file.length() == 0L) {
|
||||||
deleteFromMediaStore(file)
|
Thread {
|
||||||
|
deleteFromMediaStore(file)
|
||||||
|
}.start()
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue