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 android.util.Log
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import sushi.hardcore.droidfs.filesystems.EncryptedVolume
|
import sushi.hardcore.droidfs.filesystems.EncryptedVolume
|
||||||
import sushi.hardcore.droidfs.util.Compat
|
import sushi.hardcore.droidfs.util.Compat
|
||||||
@ -86,9 +88,11 @@ class EncryptedFileProvider(context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun free() {
|
override fun free() {
|
||||||
|
GlobalScope.launch(Dispatchers.IO) {
|
||||||
Wiper.wipe(file)
|
Wiper.wipe(file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class ExportedMemFile private constructor(path: String, private val file: MemFile) :
|
class ExportedMemFile private constructor(path: String, private val file: MemFile) :
|
||||||
ExportedFile(path) {
|
ExportedFile(path) {
|
||||||
|
Loading…
Reference in New Issue
Block a user