mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 03:40:56 +01:00
Refactor how archive service access is managed during restore.
This commit is contained in:
committed by
Greyson Parrelli
parent
c878da30ae
commit
743e2aaa82
@@ -548,9 +548,13 @@ class InternalBackupPlaygroundViewModel : ViewModel() {
|
||||
SignalExecutors.BOUNDED_IO.execute {
|
||||
Log.d(TAG, "Downloading file...")
|
||||
val tempBackupFile = BlobProvider.getInstance().forNonAutoEncryptingSingleSessionOnDisk(AppDependencies.application)
|
||||
if (!BackupRepository.downloadBackupFile(tempBackupFile)) {
|
||||
Log.e(TAG, "Failed to download backup file")
|
||||
throw IOException()
|
||||
|
||||
when (val result = BackupRepository.downloadBackupFile(tempBackupFile)) {
|
||||
is NetworkResult.Success -> Log.i(TAG, "Download successful")
|
||||
else -> {
|
||||
Log.w(TAG, "Failed to download backup file", result.getCause())
|
||||
throw IOException(result.getCause())
|
||||
}
|
||||
}
|
||||
|
||||
val encryptedStream = tempBackupFile.inputStream()
|
||||
|
||||
Reference in New Issue
Block a user