diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/build.gradle.kts | 1 | ||||
-rw-r--r-- | app/src/main/java/dev/msfjarvis/aps/injection/coroutines/DispatcherModule.kt | 19 | ||||
-rw-r--r-- | app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 855f1189..d0a0dab4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -74,6 +74,7 @@ dependencies { implementation(libs.androidx.annotation) coreLibraryDesugaring(libs.android.desugarJdkLibs) implementation(projects.autofillParser) + implementation(projects.coroutineUtils) implementation(projects.cryptoPgpainless) implementation(projects.formatCommon) implementation(projects.openpgpKtx) diff --git a/app/src/main/java/dev/msfjarvis/aps/injection/coroutines/DispatcherModule.kt b/app/src/main/java/dev/msfjarvis/aps/injection/coroutines/DispatcherModule.kt new file mode 100644 index 00000000..bf84fc27 --- /dev/null +++ b/app/src/main/java/dev/msfjarvis/aps/injection/coroutines/DispatcherModule.kt @@ -0,0 +1,19 @@ +/* + * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved. + * SPDX-License-Identifier: GPL-3.0-only + */ + +package dev.msfjarvis.aps.injection.coroutines + +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import dev.msfjarvis.aps.util.coroutines.DefaultDispatcherProvider +import dev.msfjarvis.aps.util.coroutines.DispatcherProvider + +@Module +@InstallIn(SingletonComponent::class) +interface DispatcherModule { + @Binds fun DefaultDispatcherProvider.bind(): DispatcherProvider +} diff --git a/app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt b/app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt index e02a3b86..859559cd 100644 --- a/app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt +++ b/app/src/main/java/dev/msfjarvis/aps/injection/totp/TotpModule.kt @@ -15,5 +15,5 @@ import dev.msfjarvis.aps.util.totp.UriTotpFinder @Module @InstallIn(ActivityComponent::class) interface TotpModule { - @Binds abstract fun bindTotpFinder(totpFinder: UriTotpFinder): TotpFinder + @Binds fun UriTotpFinder.bind(): TotpFinder } |