From 30e902ca55c34fa1e265a589237cf775c276d213 Mon Sep 17 00:00:00 2001 From: VishnuSanal Date: Wed, 3 Jul 2024 20:34:43 +0530 Subject: [PATCH] chore: spotless --- .../ui/activities/MainActivity.java | 5 --- .../filemanager/utils/omh/OMHClientHelper.kt | 34 +++++++++---------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/app/src/main/java/com/amaze/filemanager/ui/activities/MainActivity.java b/app/src/main/java/com/amaze/filemanager/ui/activities/MainActivity.java index ae0b9744a2..4cdd640be9 100644 --- a/app/src/main/java/com/amaze/filemanager/ui/activities/MainActivity.java +++ b/app/src/main/java/com/amaze/filemanager/ui/activities/MainActivity.java @@ -86,13 +86,11 @@ import com.amaze.filemanager.asynchronous.asynctasks.movecopy.MoveFilesTask; import com.amaze.filemanager.asynchronous.management.ServiceWatcherUtil; import com.amaze.filemanager.asynchronous.services.CopyService; -import com.amaze.filemanager.database.CloudContract; import com.amaze.filemanager.database.CloudHandler; import com.amaze.filemanager.database.SortHandler; import com.amaze.filemanager.database.TabHandler; import com.amaze.filemanager.database.UtilsHandler; import com.amaze.filemanager.database.models.OperationData; -import com.amaze.filemanager.database.models.explorer.CloudEntry; import com.amaze.filemanager.fileoperations.exceptions.CloudPluginException; import com.amaze.filemanager.fileoperations.filesystem.OpenMode; import com.amaze.filemanager.fileoperations.filesystem.StorageNaming; @@ -164,7 +162,6 @@ import android.app.Activity; import android.content.BroadcastReceiver; import android.content.ContentResolver; -import android.content.ContentUris; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; @@ -205,8 +202,6 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentTransaction; -import androidx.loader.app.LoaderManager; -import androidx.loader.content.CursorLoader; import androidx.loader.content.Loader; import io.reactivex.Completable; diff --git a/app/src/main/java/com/amaze/filemanager/utils/omh/OMHClientHelper.kt b/app/src/main/java/com/amaze/filemanager/utils/omh/OMHClientHelper.kt index b5f218fed2..89d7162b46 100644 --- a/app/src/main/java/com/amaze/filemanager/utils/omh/OMHClientHelper.kt +++ b/app/src/main/java/com/amaze/filemanager/utils/omh/OMHClientHelper.kt @@ -6,9 +6,7 @@ import com.openmobilehub.android.auth.core.OmhAuthClient import com.openmobilehub.android.auth.core.OmhAuthProvider class OMHClientHelper { - companion object { - @Volatile var instance: OmhAuthClient? = null @@ -16,21 +14,23 @@ class OMHClientHelper { public fun getGoogleAuthClient(context: Context): OmhAuthClient { if (instance == null) { synchronized(this) { - val omhAuthProvider = OmhAuthProvider.Builder() - .addNonGmsPath( - "com.openmobilehub.android.auth.plugin.google.nongms.presentation.OmhAuthFactoryImpl" - ) - .addGmsPath( - "com.openmobilehub.android.auth.plugin.google.gms.OmhAuthFactoryImpl" - ) - .build() - - instance = omhAuthProvider - .provideAuthClient( - scopes = listOf("openid", "email", "profile"), - clientId = BuildConfig.GOOGLE_CLIENT_ID, - context = context - ) + val omhAuthProvider = + OmhAuthProvider.Builder() + .addNonGmsPath( + "com.openmobilehub.android.auth.plugin.google.nongms.presentation.OmhAuthFactoryImpl", + ) + .addGmsPath( + "com.openmobilehub.android.auth.plugin.google.gms.OmhAuthFactoryImpl", + ) + .build() + + instance = + omhAuthProvider + .provideAuthClient( + scopes = listOf("openid", "email", "profile"), + clientId = BuildConfig.GOOGLE_CLIENT_ID, + context = context, + ) instance!!.initialize() }