From f5348d6c9d78f96454d7d443c42f1392a76080a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 24 Mar 2021 14:02:32 +0100 Subject: [PATCH] crypto: Remove the object signer from the crypto service --- .../internal/crypto/DefaultCryptoService.kt | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt index 936d3fb5cb..83f20a9b17 100755 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt @@ -148,8 +148,6 @@ internal class DefaultCryptoService @Inject constructor( // The key backup service. private val keysBackupService: DefaultKeysBackupService, // - private val objectSigner: ObjectSigner, - // private val roomDecryptorProvider: RoomDecryptorProvider, // The verification service. private val verificationService: DefaultVerificationService, @@ -341,11 +339,6 @@ internal class DefaultCryptoService @Inject constructor( cryptoCoroutineScope.launchToCallback(coroutineDispatchers.crypto, NoOpMatrixCallback()) { // Open the store cryptoStore.open() - // this can throw if no network - tryOrNull { - uploadDeviceKeys() - } - // this can throw if no backup tryOrNull { keysBackupService.checkAndStartKeysBackup() @@ -1005,30 +998,6 @@ internal class DefaultCryptoService @Inject constructor( } } - /** - * Upload my user's device keys. - */ - private suspend fun uploadDeviceKeys() { - // sendOutgoingRequests() - // if (cryptoStore.getDeviceKeysUploaded()) { - // Timber.d("Keys already uploaded, nothing to do") - // return - // } - // // Prepare the device keys data to send - // // Sign it - // val canonicalJson = JsonCanonicalizer.getCanonicalJson(Map::class.java, getMyDevice().signalableJSONDictionary()) - // var rest = getMyDevice().toRest() - - // rest = rest.copy( - // signatures = objectSigner.signObject(canonicalJson) - // ) - - // val uploadDeviceKeysParams = UploadKeysTask.Params(rest, null) - // uploadKeysTask.execute(uploadDeviceKeysParams) - - // cryptoStore.setDeviceKeysUploaded(true) - } - /** * Export the crypto keys *