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

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

Merge "Move effect controller injection (2/3)" into main

parents df76dba6 905acecf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@ import com.android.systemui.shared.customization.data.content.CustomizationProvi
import com.android.systemui.shared.settings.data.repository.SecureSettingsRepository
import com.android.systemui.shared.settings.data.repository.SecureSettingsRepositoryImpl
import com.android.wallpaper.customization.ui.binder.ThemePickerCustomizationOptionsBinder
import com.android.wallpaper.effects.DefaultEffectsController
import com.android.wallpaper.effects.EffectsController
import com.android.wallpaper.module.DefaultPartnerProvider
import com.android.wallpaper.module.PartnerProvider
import com.android.wallpaper.module.WallpaperPreferences
@@ -77,6 +79,10 @@ abstract class ThemePickerAppModule {
        impl: ThemePickerCustomizationOptionsBinder
    ): CustomizationOptionsBinder

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

    @Binds
    @Singleton
    abstract fun bindImageEffectDialogUtil(
+0 −34
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.wallpaper.picker.di.modules

import com.android.wallpaper.effects.DefaultEffectsController
import com.android.wallpaper.effects.EffectsController
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

/** This class provides the singleton scoped effects controller for wallpaper picker. */
@InstallIn(SingletonComponent::class)
@Module
abstract class EffectsModule {

    @Binds
    @Singleton
    abstract fun bindEffectsController(impl: DefaultEffectsController): EffectsController
}
+1 −5
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ import com.android.wallpaper.network.Requester
import com.android.wallpaper.picker.customization.ui.binder.CustomizationOptionsBinder
import com.android.wallpaper.picker.customization.ui.binder.DefaultCustomizationOptionsBinder
import com.android.wallpaper.picker.di.modules.BackgroundDispatcher
import com.android.wallpaper.picker.di.modules.EffectsModule
import com.android.wallpaper.picker.di.modules.MainDispatcher
import com.android.wallpaper.picker.preview.ui.util.DefaultImageEffectDialogUtil
import com.android.wallpaper.picker.preview.ui.util.ImageEffectDialogUtil
@@ -66,10 +65,7 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope

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

    @Binds