Fix unclosed streams during backup export.

This commit is contained in:
Cody Henthorne
2022-05-25 16:42:48 -04:00
committed by Alex Hart
parent 9fbc7c0f65
commit 4e01336b2f
2 changed files with 15 additions and 3 deletions

View File

@@ -39,6 +39,14 @@ class SpinnerApplicationContext : ApplicationContext() {
.build()
)
try {
Class.forName("dalvik.system.CloseGuard")
.getMethod("setEnabled", Boolean::class.javaPrimitiveType)
.invoke(null, true)
} catch (e: ReflectiveOperationException) {
throw RuntimeException(e)
}
Spinner.init(
this,
mapOf(