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

Commit 94b34b2d authored by Chris Poultney's avatar Chris Poultney
Browse files

Renames AppModule and TestModule instances

Bug: 331594637
Flag: NA
Test: manually verified that ThemePicker app runs
Change-Id: I3af84e80f682dc20e230dfe57db94d5e5f575f15
parent fccc06e0
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.android.wallpaper.module
package com.android.wallpaper.modules

import android.content.Context
import com.android.customization.model.color.ColorCustomizationManager
@@ -23,6 +23,9 @@ import com.android.customization.module.DefaultCustomizationPreferences
import com.android.customization.module.ThemePickerInjector
import com.android.customization.module.logging.ThemesUserEventLogger
import com.android.customization.module.logging.ThemesUserEventLoggerImpl
import com.android.wallpaper.module.DefaultPartnerProvider
import com.android.wallpaper.module.PartnerProvider
import com.android.wallpaper.module.WallpaperPreferences
import com.android.wallpaper.module.logging.UserEventLogger
import com.android.wallpaper.picker.preview.data.util.DefaultLiveWallpaperDownloader
import com.android.wallpaper.picker.preview.data.util.LiveWallpaperDownloader
@@ -38,7 +41,7 @@ import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class AppModule {
abstract class ThemePickerAppModule {
    @Binds @Singleton abstract fun bindInjector(impl: ThemePickerInjector): CustomizationInjector

    @Binds
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ package {
android_library {
    name: "ThemePickerTestModule",
    defaults: ["ThemePicker_defaults_with_overrides"],
    srcs: ["src/com/android/customization/TestModule.kt"],
    srcs: ["src/com/android/wallpaper/ThemePickerTestModule.kt"],
    static_libs: [
        "ThemePickerTestLib",
        "hilt_android",
+19 −4
Original line number Diff line number Diff line
package com.android.customization
/*
 * 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

import androidx.test.core.app.ApplicationProvider
import com.android.customization.model.color.ColorCustomizationManager
@@ -9,12 +24,12 @@ 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.module.AppModule
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.preview.data.util.DefaultLiveWallpaperDownloader
import com.android.wallpaper.picker.preview.data.util.LiveWallpaperDownloader
import com.android.wallpaper.testing.TestInjector
@@ -30,8 +45,8 @@ import dagger.hilt.testing.TestInstallIn
import javax.inject.Singleton

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

    @Binds @Singleton abstract fun bindInjector(impl: TestCustomizationInjector): Injector