From 8abea2ad536750b6be41f9411ed093d425630f0f Mon Sep 17 00:00:00 2001 From: alperozturk Date: Wed, 8 Nov 2023 15:25:42 +0100 Subject: [PATCH] Fix code detekt Signed-off-by: alperozturk --- .../authentication/AccountAuthenticator.kt | 1 + .../AccountAuthenticatorActivity.kt | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/authentication/AccountAuthenticator.kt b/app/src/main/java/com/owncloud/android/authentication/AccountAuthenticator.kt index b3d447fa09eb..9223ad8ee737 100644 --- a/app/src/main/java/com/owncloud/android/authentication/AccountAuthenticator.kt +++ b/app/src/main/java/com/owncloud/android/authentication/AccountAuthenticator.kt @@ -140,6 +140,7 @@ class AccountAuthenticator(private val mContext: Context) : AbstractAccountAuthe /** * {@inheritDoc} */ + @Suppress("ReturnCount") override fun getAuthToken( response: AccountAuthenticatorResponse, account: Account, diff --git a/app/src/main/java/com/owncloud/android/authentication/AccountAuthenticatorActivity.kt b/app/src/main/java/com/owncloud/android/authentication/AccountAuthenticatorActivity.kt index 7e54bc396c27..5211efab1556 100644 --- a/app/src/main/java/com/owncloud/android/authentication/AccountAuthenticatorActivity.kt +++ b/app/src/main/java/com/owncloud/android/authentication/AccountAuthenticatorActivity.kt @@ -22,13 +22,18 @@ import androidx.appcompat.app.AppCompatActivity import com.nextcloud.utils.extensions.getParcelableArgument /* - * Base class for implementing an Activity that is used to help implement an AbstractAccountAuthenticator. - * If the AbstractAccountAuthenticator needs to use an activity to handle the request then it can have the activity extend - * AccountAuthenticatorActivity. The AbstractAccountAuthenticator passes in the response to the intent using the following: + * Base class for implementing an Activity that is used to help + * implement an AbstractAccountAuthenticator. + * If the AbstractAccountAuthenticator needs to use an activity to handle + * the request then it can have the activity extend + * AccountAuthenticatorActivity. The AbstractAccountAuthenticator passes + * in the response to the intent using the following: * intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response); * - * The activity then sets the result that is to be handed to the response via setAccountAuthenticatorResult(android.os.Bundle). - * This result will be sent as the result of the request when the activity finishes. If this is never set or if it is set to null + * The activity then sets the result that is to be handed to the response via + * setAccountAuthenticatorResult(android.os.Bundle). + * This result will be sent as the result of the request when the activity + * finishes. If this is never set or if it is set to null * then error AccountManager.ERROR_CODE_CANCELED will be called on the response. */ abstract class AccountAuthenticatorActivity : AppCompatActivity() {