Loading src_override/com/android/wallpaper/module/AppModule.kt→src_override/com/android/wallpaper/modules/ThemePickerAppModule.kt +5 −2 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading tests/module/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -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", Loading tests/module/src/com/android/customization/TestModule.kt→tests/module/src/com/android/wallpaper/ThemePickerTestModule.kt +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 Loading @@ -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 Loading @@ -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 Loading Loading
src_override/com/android/wallpaper/module/AppModule.kt→src_override/com/android/wallpaper/modules/ThemePickerAppModule.kt +5 −2 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading
tests/module/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -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", Loading
tests/module/src/com/android/customization/TestModule.kt→tests/module/src/com/android/wallpaper/ThemePickerTestModule.kt +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 Loading @@ -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 Loading @@ -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 Loading