diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/secrets/DefaultSharedSecretStorageService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/secrets/DefaultSharedSecretStorageService.kt index 7186bc3cd0..1cae1a4e2b 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/secrets/DefaultSharedSecretStorageService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/secrets/DefaultSharedSecretStorageService.kt @@ -371,7 +371,7 @@ internal class DefaultSharedSecretStorageService @Inject constructor( callback.onFailure(SharedSecretStorageError.BadKeyFormat) } cryptoCoroutineScope.launch(coroutineDispatchers.main) { - kotlin.runCatching { + runCatching { // decrypt from recovery key withOlmDecryption { olmPkDecryption -> olmPkDecryption.setPrivateKey(keySpec.privateKey) @@ -390,7 +390,7 @@ internal class DefaultSharedSecretStorageService @Inject constructor( callback.onFailure(SharedSecretStorageError.BadKeyFormat) } cryptoCoroutineScope.launch(coroutineDispatchers.main) { - kotlin.runCatching { + runCatching { decryptAesHmacSha2(keySpec, name, secretContent) }.foldToCallback(callback) } diff --git a/vector/src/main/java/im/vector/app/features/crypto/keysrequest/KeyRequestHandler.kt b/vector/src/main/java/im/vector/app/features/crypto/keysrequest/KeyRequestHandler.kt index 4ed0e037d4..4268317700 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/keysrequest/KeyRequestHandler.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/keysrequest/KeyRequestHandler.kt @@ -126,7 +126,7 @@ class KeyRequestHandler @Inject constructor( // can we get more info on this device? session?.cryptoService()?.getMyDevicesInfo()?.firstOrNull { it.deviceId == deviceId }?.let { postAlert(context, userId, deviceId, true, deviceInfo, it) - } ?: kotlin.run { + } ?: run { postAlert(context, userId, deviceId, true, deviceInfo) } } else { diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapCrossSigningTask.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapCrossSigningTask.kt index 4dc2b92751..b7c689f41f 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapCrossSigningTask.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapCrossSigningTask.kt @@ -139,7 +139,7 @@ class BootstrapCrossSigningTask @Inject constructor( null, it ) - } ?: kotlin.run { + } ?: run { ssssService.generateKey( UUID.randomUUID().toString(), params.keySpec, diff --git a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSharedViewModel.kt b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSharedViewModel.kt index a3955d561e..6d711ec0e9 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSharedViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSharedViewModel.kt @@ -301,7 +301,7 @@ class BootstrapSharedViewModel @AssistedInject constructor( // ======================================= private fun saveRecoveryKeyToUri(os: OutputStream) = withState { state -> viewModelScope.launch(Dispatchers.IO) { - kotlin.runCatching { + runCatching { os.use { os.write((state.recoveryKeyCreationInfo?.recoveryKey?.formatRecoveryKey() ?: "").toByteArray()) } diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationEmojisItem.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationEmojisItem.kt index 77fa9cb775..daa9a913c9 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationEmojisItem.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/epoxy/BottomSheetVerificationEmojisItem.kt @@ -72,7 +72,7 @@ abstract class BottomSheetVerificationEmojisItem : VectorEpoxyModel(R.id.item_emoji_tv).isVisible = false view.findViewById(R.id.item_emoji_image).isVisible = true view.findViewById(R.id.item_emoji_image).setImageDrawable(ContextCompat.getDrawable(view.context, it)) - } ?: kotlin.run { + } ?: run { view.findViewById(R.id.item_emoji_tv).isVisible = true view.findViewById(R.id.item_emoji_image).isVisible = false view.findViewById(R.id.item_emoji_tv).text = rep.emoji