Merge "Move enum class Screen (1/3)" into main
diff --git a/src/com/android/customization/module/DefaultCustomizationSections.java b/src/com/android/customization/module/DefaultCustomizationSections.java
index ee579fe..33cb620 100644
--- a/src/com/android/customization/module/DefaultCustomizationSections.java
+++ b/src/com/android/customization/module/DefaultCustomizationSections.java
@@ -33,6 +33,7 @@
 import com.android.wallpaper.model.CustomizationSectionController;
 import com.android.wallpaper.model.CustomizationSectionController.CustomizationSectionNavigationController;
 import com.android.wallpaper.model.PermissionRequester;
+import com.android.wallpaper.model.Screen;
 import com.android.wallpaper.model.WallpaperPreviewNavigator;
 import com.android.wallpaper.module.CurrentWallpaperInfoFactory;
 import com.android.wallpaper.module.CustomizationSections;
diff --git a/src/com/android/customization/picker/clock/ui/fragment/ClockSettingsFragment.kt b/src/com/android/customization/picker/clock/ui/fragment/ClockSettingsFragment.kt
index 262b522..c2e6717 100644
--- a/src/com/android/customization/picker/clock/ui/fragment/ClockSettingsFragment.kt
+++ b/src/com/android/customization/picker/clock/ui/fragment/ClockSettingsFragment.kt
@@ -30,7 +30,7 @@
 import com.android.customization.picker.clock.ui.binder.ClockSettingsBinder
 import com.android.systemui.shared.clocks.shared.model.ClockPreviewConstants
 import com.android.themepicker.R
-import com.android.wallpaper.module.CustomizationSections
+import com.android.wallpaper.model.Screen
 import com.android.wallpaper.module.InjectorProvider
 import com.android.wallpaper.picker.AppbarFragment
 import com.android.wallpaper.picker.customization.ui.binder.ScreenPreviewBinder
@@ -113,7 +113,7 @@
                         }
                     },
                     wallpaperInteractor = injector.getWallpaperInteractor(requireContext()),
-                    screen = CustomizationSections.Screen.LOCK_SCREEN,
+                    screen = Screen.LOCK_SCREEN,
                 ),
             lifecycleOwner = this,
             offsetToStart = displayUtils.isSingleDisplayOrUnfoldedHorizontalHinge(activity),
diff --git a/src/com/android/customization/picker/color/ui/fragment/ColorPickerFragment.kt b/src/com/android/customization/picker/color/ui/fragment/ColorPickerFragment.kt
index d8b417a..a2dc526 100644
--- a/src/com/android/customization/picker/color/ui/fragment/ColorPickerFragment.kt
+++ b/src/com/android/customization/picker/color/ui/fragment/ColorPickerFragment.kt
@@ -33,7 +33,7 @@
 import com.android.customization.module.ThemePickerInjector
 import com.android.customization.picker.color.ui.binder.ColorPickerBinder
 import com.android.themepicker.R
-import com.android.wallpaper.module.CustomizationSections
+import com.android.wallpaper.model.Screen
 import com.android.wallpaper.module.InjectorProvider
 import com.android.wallpaper.picker.AppbarFragment
 import com.android.wallpaper.picker.customization.data.repository.WallpaperColorsRepository
@@ -126,7 +126,7 @@
                                             loadInitialColors(
                                                 wallpaperManager,
                                                 wallpaperColorsRepository,
-                                                CustomizationSections.Screen.LOCK_SCREEN
+                                                Screen.LOCK_SCREEN
                                             )
                                         }
                                     }
@@ -138,7 +138,7 @@
                             wallpaperColorsRepository.setLockWallpaperColors(colors)
                         },
                         wallpaperInteractor = injector.getWallpaperInteractor(requireContext()),
-                        screen = CustomizationSections.Screen.LOCK_SCREEN,
+                        screen = Screen.LOCK_SCREEN,
                     ),
                 lifecycleOwner = this,
                 offsetToStart =
@@ -177,7 +177,7 @@
                                         loadInitialColors(
                                             wallpaperManager,
                                             wallpaperColorsRepository,
-                                            CustomizationSections.Screen.HOME_SCREEN
+                                            Screen.HOME_SCREEN
                                         )
                                     }
                                 }
@@ -189,7 +189,7 @@
                         wallpaperColorsRepository.setHomeWallpaperColors(colors)
                     },
                     wallpaperInteractor = injector.getWallpaperInteractor(requireContext()),
-                    screen = CustomizationSections.Screen.HOME_SCREEN,
+                    screen = Screen.HOME_SCREEN,
                 ),
             lifecycleOwner = this,
             offsetToStart =
@@ -222,19 +222,19 @@
     private suspend fun loadInitialColors(
         wallpaperManager: WallpaperManager,
         colorViewModel: WallpaperColorsRepository,
-        screen: CustomizationSections.Screen,
+        screen: Screen,
     ) {
         withContext(Dispatchers.IO) {
             val colors =
                 wallpaperManager.getWallpaperColors(
-                    if (screen == CustomizationSections.Screen.LOCK_SCREEN) {
+                    if (screen == Screen.LOCK_SCREEN) {
                         WallpaperManager.FLAG_LOCK
                     } else {
                         WallpaperManager.FLAG_SYSTEM
                     }
                 )
             withContext(Dispatchers.Main) {
-                if (screen == CustomizationSections.Screen.LOCK_SCREEN) {
+                if (screen == Screen.LOCK_SCREEN) {
                     colorViewModel.setLockWallpaperColors(colors)
                 } else {
                     colorViewModel.setHomeWallpaperColors(colors)
diff --git a/src/com/android/customization/picker/grid/ui/fragment/GridFragment.kt b/src/com/android/customization/picker/grid/ui/fragment/GridFragment.kt
index 8f7d7e5..b48f41a 100644
--- a/src/com/android/customization/picker/grid/ui/fragment/GridFragment.kt
+++ b/src/com/android/customization/picker/grid/ui/fragment/GridFragment.kt
@@ -36,8 +36,8 @@
 import com.android.customization.picker.grid.ui.viewmodel.GridScreenViewModel
 import com.android.themepicker.R
 import com.android.wallpaper.config.BaseFlags
+import com.android.wallpaper.model.Screen
 import com.android.wallpaper.module.CurrentWallpaperInfoFactory
-import com.android.wallpaper.module.CustomizationSections
 import com.android.wallpaper.module.InjectorProvider
 import com.android.wallpaper.picker.AppbarFragment
 import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
@@ -192,7 +192,7 @@
                         }
                     },
                     wallpaperInteractor = wallpaperInteractor,
-                    screen = CustomizationSections.Screen.HOME_SCREEN,
+                    screen = Screen.HOME_SCREEN,
                 ),
             lifecycleOwner = viewLifecycleOwner,
             offsetToStart = false,
diff --git a/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt b/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
index c434ce3..e1f8df2 100644
--- a/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
+++ b/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
@@ -42,9 +42,9 @@
 import com.android.themepicker.R
 import com.android.wallpaper.model.CustomizationSectionController
 import com.android.wallpaper.model.CustomizationSectionController.CustomizationSectionNavigationController
+import com.android.wallpaper.model.Screen
 import com.android.wallpaper.model.WallpaperPreviewNavigator
 import com.android.wallpaper.module.CurrentWallpaperInfoFactory
-import com.android.wallpaper.module.CustomizationSections
 import com.android.wallpaper.picker.customization.data.repository.WallpaperColorsRepository
 import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
 import com.android.wallpaper.picker.customization.ui.section.ScreenPreviewClickView
@@ -62,7 +62,7 @@
 class PreviewWithClockCarouselSectionController(
     activity: ComponentActivity,
     private val lifecycleOwner: LifecycleOwner,
-    private val screen: CustomizationSections.Screen,
+    private val screen: Screen,
     wallpaperInfoFactory: CurrentWallpaperInfoFactory,
     wallpaperColorsRepository: WallpaperColorsRepository,
     displayUtils: DisplayUtils,
@@ -109,7 +109,7 @@
         params: CustomizationSectionController.ViewCreationParams,
     ): ScreenPreviewView {
         val view = super.createView(context, params)
-        if (screen == CustomizationSections.Screen.LOCK_SCREEN) {
+        if (screen == Screen.LOCK_SCREEN) {
             val screenPreviewClickView: ScreenPreviewClickView =
                 view.requireViewById(com.android.wallpaper.R.id.screen_preview_click_view)
             val clockColorAndSizeButtonStub: ViewStub =
diff --git a/src/com/android/customization/picker/preview/ui/section/PreviewWithThemeSectionController.kt b/src/com/android/customization/picker/preview/ui/section/PreviewWithThemeSectionController.kt
index b3e778b..78e3745 100644
--- a/src/com/android/customization/picker/preview/ui/section/PreviewWithThemeSectionController.kt
+++ b/src/com/android/customization/picker/preview/ui/section/PreviewWithThemeSectionController.kt
@@ -25,9 +25,9 @@
 import com.android.customization.picker.color.domain.interactor.ColorPickerInteractor
 import com.android.customization.picker.preview.ui.viewmodel.PreviewWithThemeViewModel
 import com.android.wallpaper.R
+import com.android.wallpaper.model.Screen
 import com.android.wallpaper.model.WallpaperPreviewNavigator
 import com.android.wallpaper.module.CurrentWallpaperInfoFactory
-import com.android.wallpaper.module.CustomizationSections
 import com.android.wallpaper.picker.customization.data.repository.WallpaperColorsRepository
 import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
 import com.android.wallpaper.picker.customization.ui.section.ScreenPreviewSectionController
@@ -45,7 +45,7 @@
 open class PreviewWithThemeSectionController(
     activity: Activity,
     lifecycleOwner: LifecycleOwner,
-    private val screen: CustomizationSections.Screen,
+    private val screen: Screen,
     private val wallpaperInfoFactory: CurrentWallpaperInfoFactory,
     private val wallpaperColorsRepository: WallpaperColorsRepository,
     displayUtils: DisplayUtils,
diff --git a/src/com/android/customization/picker/preview/ui/viewmodel/PreviewWithThemeViewModel.kt b/src/com/android/customization/picker/preview/ui/viewmodel/PreviewWithThemeViewModel.kt
index 83f986d..7877f11 100644
--- a/src/com/android/customization/picker/preview/ui/viewmodel/PreviewWithThemeViewModel.kt
+++ b/src/com/android/customization/picker/preview/ui/viewmodel/PreviewWithThemeViewModel.kt
@@ -21,8 +21,8 @@
 import android.os.Bundle
 import com.android.customization.model.themedicon.domain.interactor.ThemedIconInteractor
 import com.android.customization.picker.color.domain.interactor.ColorPickerInteractor
+import com.android.wallpaper.model.Screen
 import com.android.wallpaper.model.WallpaperInfo
-import com.android.wallpaper.module.CustomizationSections
 import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
 import com.android.wallpaper.picker.customization.ui.viewmodel.ScreenPreviewViewModel
 import com.android.wallpaper.util.PreviewUtils
@@ -38,7 +38,7 @@
     wallpaperInteractor: WallpaperInteractor,
     private val themedIconInteractor: ThemedIconInteractor? = null,
     colorPickerInteractor: ColorPickerInteractor? = null,
-    screen: CustomizationSections.Screen,
+    screen: Screen,
 ) :
     ScreenPreviewViewModel(
         previewUtils,
@@ -59,6 +59,5 @@
                 colorIsLoading ->
                 wallpaperIsLoading || colorIsLoading
             }
-        }
-            ?: wallpaperIsLoading
+        } ?: wallpaperIsLoading
 }
diff --git a/src/com/android/customization/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModel.kt b/src/com/android/customization/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModel.kt
index 97afb7a..da1040e 100644
--- a/src/com/android/customization/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModel.kt
+++ b/src/com/android/customization/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModel.kt
@@ -31,8 +31,8 @@
 import com.android.systemui.shared.keyguard.shared.model.KeyguardQuickAffordanceSlots
 import com.android.systemui.shared.quickaffordance.shared.model.KeyguardPreviewConstants
 import com.android.themepicker.R
+import com.android.wallpaper.model.Screen
 import com.android.wallpaper.module.CurrentWallpaperInfoFactory
-import com.android.wallpaper.module.CustomizationSections
 import com.android.wallpaper.picker.common.button.ui.viewmodel.ButtonStyle
 import com.android.wallpaper.picker.common.button.ui.viewmodel.ButtonViewModel
 import com.android.wallpaper.picker.common.dialog.ui.viewmodel.DialogViewModel
@@ -102,7 +102,7 @@
                 }
             },
             wallpaperInteractor = wallpaperInteractor,
-            screen = CustomizationSections.Screen.LOCK_SCREEN,
+            screen = Screen.LOCK_SCREEN,
         )
 
     /** A locally-selected slot, if the user ever switched from the original one. */
@@ -307,7 +307,8 @@
 
             KeyguardQuickAffordanceSummaryViewModel(
                 description = toDescriptionText(context, slots),
-                icon1 = icon1
+                icon1 =
+                    icon1
                         ?: if (icon2 == null) {
                             Icon.Resource(
                                 res = R.drawable.link_off,