Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79fa4091 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Makes fake EffectsController injectable" into main

parents a00436e8 b16114e3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ import javax.inject.Singleton
/** This class provides the singleton scoped effects controller for wallpaper picker. */
@InstallIn(SingletonComponent::class)
@Module
internal abstract class EffectsModule {
abstract class EffectsModule {

    @Binds
    @Singleton
+11 −1
Original line number Diff line number Diff line
@@ -24,12 +24,15 @@ import com.android.customization.module.logging.TestThemesUserEventLogger
import com.android.customization.module.logging.ThemesUserEventLogger
import com.android.customization.testing.TestCustomizationInjector
import com.android.customization.testing.TestDefaultCustomizationPreferences
import com.android.wallpaper.effects.EffectsController
import com.android.wallpaper.effects.FakeEffectsController
import com.android.wallpaper.module.Injector
import com.android.wallpaper.module.PartnerProvider
import com.android.wallpaper.module.WallpaperPreferences
import com.android.wallpaper.module.logging.TestUserEventLogger
import com.android.wallpaper.module.logging.UserEventLogger
import com.android.wallpaper.modules.ThemePickerAppModule
import com.android.wallpaper.picker.di.modules.EffectsModule
import com.android.wallpaper.picker.preview.data.util.DefaultLiveWallpaperDownloader
import com.android.wallpaper.picker.preview.data.util.LiveWallpaperDownloader
import com.android.wallpaper.picker.preview.ui.util.DefaultImageEffectDialogUtil
@@ -45,7 +48,10 @@ import dagger.hilt.testing.TestInstallIn
import javax.inject.Singleton

@Module
@TestInstallIn(components = [SingletonComponent::class], replaces = [ThemePickerAppModule::class])
@TestInstallIn(
    components = [SingletonComponent::class],
    replaces = [EffectsModule::class, ThemePickerAppModule::class]
)
abstract class ThemePickerTestModule {
    //// WallpaperPicker2 prod

@@ -95,6 +101,10 @@ abstract class ThemePickerTestModule {
        impl: DefaultImageEffectDialogUtil
    ): ImageEffectDialogUtil

    @Binds
    @Singleton
    abstract fun bindEffectsController(impl: FakeEffectsController): EffectsController

    companion object {
        @Provides
        @Singleton