From 283c8ee2b7612499ad23dd9ebf311fa0a07c9c72 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Tue, 31 Oct 2023 11:48:04 +0100 Subject: [PATCH] Suppress code detekt Signed-off-by: alperozturk --- .../android/ui/dialog/SetupEncryptionDialogFragment.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.kt index 8ed87f831bdc..0dcf0699a495 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.kt @@ -289,6 +289,7 @@ class SetupEncryptionDialogFragment : DialogFragment(), Injectable { mWeakContext = WeakReference(context) } + @Suppress("ReturnCount") @Deprecated("Deprecated in Java") override fun doInBackground(vararg params: Void?): String? { // fetch private/public key @@ -379,6 +380,7 @@ class SetupEncryptionDialogFragment : DialogFragment(), Injectable { binding.encryptionStatus.setText(R.string.end_to_end_encryption_generating_keys) } + @Suppress("TooGenericExceptionCaught", "ReturnCount") @Deprecated("Deprecated in Java") override fun doInBackground(vararg voids: Void?): String { // - create CSR, push to server, store returned public key in database @@ -423,17 +425,17 @@ class SetupEncryptionDialogFragment : DialogFragment(), Injectable { val storePrivateKeyResult = storePrivateKeyOperation.execute(user, context) if (storePrivateKeyResult.isSuccess) { Log_OC.d(TAG, "private key success") - arbitraryDataProvider!!.storeOrUpdateKeyValue( + arbitraryDataProvider?.storeOrUpdateKeyValue( user.accountName, EncryptionUtils.PRIVATE_KEY, privateKeyString ) - arbitraryDataProvider!!.storeOrUpdateKeyValue( + arbitraryDataProvider?.storeOrUpdateKeyValue( user.accountName, EncryptionUtils.PUBLIC_KEY, publicKeyString ) - arbitraryDataProvider!!.storeOrUpdateKeyValue( + arbitraryDataProvider?.storeOrUpdateKeyValue( user.accountName, EncryptionUtils.MNEMONIC, generateMnemonicString(true)