Tabbed navigation in Wallpaper Picker (1/3).
Introduces tabbed navigation to switch between home and lock screen in
wallpaper picker.
Fix: 262924054
Test: Includes new unit tests for new view-model
Test: Manually verified that switching back and forth keeps the previews
alive and selectively switches the bottom few sections in a nice,
animated way with minimal/no jank.
Change-Id: I087b4c03ac29236be0ed7d512b15e6af887c449f
diff --git a/src/com/android/wallpaper/module/WallpaperPickerSections.java b/src/com/android/wallpaper/module/WallpaperPickerSections.java
index 39daa3d..3078242 100644
--- a/src/com/android/wallpaper/module/WallpaperPickerSections.java
+++ b/src/com/android/wallpaper/module/WallpaperPickerSections.java
@@ -21,6 +21,33 @@
public final class WallpaperPickerSections implements CustomizationSections {
@Override
+ public List<CustomizationSectionController<?>> getSectionControllersForScreen(
+ Screen screen,
+ FragmentActivity activity,
+ LifecycleOwner lifecycleOwner,
+ WallpaperColorsViewModel wallpaperColorsViewModel,
+ WorkspaceViewModel workspaceViewModel,
+ PermissionRequester permissionRequester,
+ WallpaperPreviewNavigator wallpaperPreviewNavigator,
+ CustomizationSectionNavigationController sectionNavigationController,
+ @Nullable Bundle savedInstanceState) {
+ List<CustomizationSectionController<?>> sectionControllers = new ArrayList<>();
+
+ sectionControllers.add(
+ new WallpaperSectionController(
+ activity,
+ lifecycleOwner,
+ permissionRequester,
+ wallpaperColorsViewModel,
+ workspaceViewModel,
+ sectionNavigationController,
+ wallpaperPreviewNavigator,
+ savedInstanceState));
+
+ return sectionControllers;
+ }
+
+ @Override
public List<CustomizationSectionController<?>> getAllSectionControllers(
FragmentActivity activity,
LifecycleOwner lifecycleOwner,