Wipe exported disk files on background threads
This commit is contained in:
parent
b477272d65
commit
2d5f5a82c9
@ -9,6 +9,8 @@ import android.system.Os
|
||||
import android.util.Log
|
||||
import androidx.preference.PreferenceManager
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import sushi.hardcore.droidfs.filesystems.EncryptedVolume
|
||||
import sushi.hardcore.droidfs.util.Compat
|
||||
@ -86,9 +88,11 @@ class EncryptedFileProvider(context: Context) {
|
||||
}
|
||||
|
||||
override fun free() {
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
Wiper.wipe(file)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ExportedMemFile private constructor(path: String, private val file: MemFile) :
|
||||
ExportedFile(path) {
|
||||
|
Loading…
Reference in New Issue
Block a user