Revert^2 "BC25 Preview current wallpapers (2/2)"
Original change ag/28168949 caused post-submit build failures. Bringing
the original change back with fixes in WPPG to resolve test failures,
verified using ABTD.
Flag: com.android.wallpaper.new_picker_ui_flag
Bug: 348462236
Test: tested on ABTD to ensure the original build error is resolved
Change-Id: Ib1048d32667a665b41a94ed45ef3f35098147b1f
diff --git a/src/com/android/customization/module/ThemePickerInjector.kt b/src/com/android/customization/module/ThemePickerInjector.kt
index f25ff3d..d26141b 100644
--- a/src/com/android/customization/module/ThemePickerInjector.kt
+++ b/src/com/android/customization/module/ThemePickerInjector.kt
@@ -66,9 +66,7 @@
import com.android.wallpaper.module.FragmentFactory
import com.android.wallpaper.module.WallpaperPicker2Injector
import com.android.wallpaper.picker.CustomizationPickerActivity
-import com.android.wallpaper.picker.customization.data.content.WallpaperClientImpl
import com.android.wallpaper.picker.customization.data.repository.WallpaperColorsRepository
-import com.android.wallpaper.picker.customization.data.repository.WallpaperRepository
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
import com.android.wallpaper.picker.di.modules.BackgroundDispatcher
import com.android.wallpaper.picker.di.modules.MainDispatcher
@@ -87,9 +85,8 @@
@MainDispatcher private val mainScope: CoroutineScope,
@BackgroundDispatcher private val bgScope: CoroutineScope,
@BackgroundDispatcher private val bgDispatcher: CoroutineDispatcher,
-) : WallpaperPicker2Injector(mainScope, bgDispatcher), CustomizationInjector {
+) : WallpaperPicker2Injector(mainScope), CustomizationInjector {
private var customizationSections: CustomizationSections? = null
- private var wallpaperInteractor: WallpaperInteractor? = null
private var keyguardQuickAffordancePickerViewModelFactory:
KeyguardQuickAffordancePickerViewModel.Factory? =
null
@@ -196,27 +193,7 @@
}
override fun getWallpaperInteractor(context: Context): WallpaperInteractor {
- if (getFlags().isMultiCropEnabled()) {
- return injectedWallpaperInteractor.get()
- }
-
- val appContext = context.applicationContext
- return wallpaperInteractor
- ?: WallpaperInteractor(
- repository =
- WallpaperRepository(
- scope = getApplicationCoroutineScope(),
- client =
- WallpaperClientImpl(
- context = appContext,
- wallpaperManager = WallpaperManager.getInstance(appContext),
- wallpaperPreferences = getPreferences(appContext),
- ),
- wallpaperPreferences = getPreferences(context = appContext),
- backgroundDispatcher = bgDispatcher,
- ),
- )
- .also { wallpaperInteractor = it }
+ return injectedWallpaperInteractor.get()
}
override fun getKeyguardQuickAffordancePickerInteractor(