From 5e4e54153c8a9049c19d49ec10b6607f73f2da01 Mon Sep 17 00:00:00 2001 From: Dominic Fischer Date: Mon, 21 Oct 2019 22:52:58 +0100 Subject: [PATCH] Fix build error. Signed-off-by: Dominic Fischer --- .../internal/crypto/keysbackup/KeysBackup.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/keysbackup/KeysBackup.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/keysbackup/KeysBackup.kt index b90ba58b88..ab665dbf99 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/keysbackup/KeysBackup.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/keysbackup/KeysBackup.kt @@ -630,14 +630,12 @@ internal class KeysBackup @Inject constructor( } // Get a PK decryption instance - val decryption = pkDecryptionFromRecoveryKey(recoveryKey) - if (decryption == null) { - // This should not happen anymore - Timber.e("restoreKeysWithRecoveryKey: Invalid recovery key. Error") - throw InvalidParameterException("Invalid recovery key") - } - - decryption + pkDecryptionFromRecoveryKey(recoveryKey) + } + if (decryption == null) { + // This should not happen anymore + Timber.e("restoreKeysWithRecoveryKey: Invalid recovery key. Error") + throw InvalidParameterException("Invalid recovery key") } stepProgressListener?.onStepProgress(StepProgressListener.Step.DownloadingKey)