Minor cleanup

This commit is contained in:
arkon
2022-06-20 22:51:04 -04:00
parent 8fedd2d5f1
commit 254f021903
4 changed files with 21 additions and 16 deletions

View File

@@ -23,6 +23,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
override suspend fun performRestore(uri: Uri): Boolean {
backupManager = FullBackupManager(context)
@Suppress("BlockingMethodInNonBlockingContext")
val backupString = context.contentResolver.openInputStream(uri)!!.source().gzip().buffer().use { it.readByteArray() }
val backup = backupManager.parser.decodeFromByteArray(BackupSerializer, backupString)