delete file from mediastore on ViewPagerActivity in the background

This commit is contained in:
tibbi 2018-02-04 12:13:49 +01:00
parent 2ca0bded2d
commit 42faaf51c1

View file

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