summaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorAustin Wang <wangaustin@google.com>2023-11-07 08:29:55 -0800
committerAustin Wang <wangaustin@google.com>2023-11-21 18:09:07 +0000
commit20268af06d0c9024aa278d055e21e120b7cca1c0 (patch)
treea4b1ac548a5c677afa2cb32101d38e6ee351ba9c /src/com
parenta52691e38b618b75a1c8618c3a292e0891fe8539 (diff)
downloadThemePicker-20268af06d0c9024aa278d055e21e120b7cca1c0.tar.gz
Inject WallpaperInteractor and repository (2/3)
Flag: ACONFIG com.android.wallpaper.multi_crop_preview_ui_flag DEVELOPMENT Bug: 303317694 Test: launch multi crop preview Change-Id: I0121da42a69d221b8f229d69607907495fac7779
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/customization/module/ThemePickerInjector.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/customization/module/ThemePickerInjector.kt b/src/com/android/customization/module/ThemePickerInjector.kt
index 819f906f..e01fa44e 100644
--- a/src/com/android/customization/module/ThemePickerInjector.kt
+++ b/src/com/android/customization/module/ThemePickerInjector.kt
@@ -28,7 +28,6 @@ import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.ViewModelProvider
import com.android.customization.model.color.ColorCustomizationManager
-import com.android.customization.model.color.ColorOptionsProvider
import com.android.customization.model.color.ColorOptionsProvider.COLOR_SOURCE_PRESET
import com.android.customization.model.grid.GridOptionsManager
import com.android.customization.model.mode.DarkModeSnapshotRestorer
@@ -197,6 +196,10 @@ internal constructor(
}
override fun getWallpaperInteractor(context: Context): WallpaperInteractor {
+ if (getFlags().isMultiCropEnabled() && getFlags().isMultiCropPreviewUiEnabled()) {
+ return injectedWallpaperInteractor
+ }
+
val appContext = context.applicationContext
return wallpaperInteractor
?: WallpaperInteractor(
@@ -206,7 +209,6 @@ internal constructor(
client =
WallpaperClientImpl(
context = appContext,
- infoFactory = getCurrentWallpaperInfoFactory(appContext),
wallpaperManager = WallpaperManager.getInstance(appContext),
wallpaperPreferences = getPreferences(appContext)
),
@@ -216,7 +218,7 @@ internal constructor(
shouldHandleReload = {
TextUtils.equals(
getColorCustomizationManager(appContext).currentColorSource,
- ColorOptionsProvider.COLOR_SOURCE_PRESET
+ COLOR_SOURCE_PRESET,
)
}
)