• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.android.wallpaper.module;
2 
3 import android.os.Bundle;
4 
5 import androidx.annotation.Nullable;
6 import androidx.fragment.app.FragmentActivity;
7 import androidx.lifecycle.LifecycleOwner;
8 
9 import com.android.wallpaper.model.CustomizationSectionController;
10 import com.android.wallpaper.model.CustomizationSectionController.CustomizationSectionNavigationController;
11 import com.android.wallpaper.model.PermissionRequester;
12 import com.android.wallpaper.model.WallpaperColorsViewModel;
13 import com.android.wallpaper.model.WallpaperPreviewNavigator;
14 import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor;
15 import com.android.wallpaper.picker.customization.ui.viewmodel.WallpaperQuickSwitchViewModel;
16 import com.android.wallpaper.util.DisplayUtils;
17 
18 import java.util.List;
19 
20 /** Interface for carry {@link CustomizationSectionController}s. */
21 public interface CustomizationSections {
22 
23     /** Enumerates all screens supported by {@code getSectionControllersForScreen}. */
24     enum Screen {
25         LOCK_SCREEN,
26         HOME_SCREEN,
27     }
28 
29     /**
30      * Currently protected under BaseFlags.isUseRevampedUi() flag.
31      *
32      * Gets a new instance of the section controller list for the given {@link Screen}.
33      *
34      * Note that the section views will be displayed by the list ordering.
35      *
36      * <p>Don't keep the section controllers as singleton since they contain views.
37      */
getRevampedUISectionControllersForScreen( Screen screen, FragmentActivity activity, LifecycleOwner lifecycleOwner, WallpaperColorsViewModel wallpaperColorsViewModel, PermissionRequester permissionRequester, WallpaperPreviewNavigator wallpaperPreviewNavigator, CustomizationSectionNavigationController sectionNavigationController, @Nullable Bundle savedInstanceState, CurrentWallpaperInfoFactory wallpaperInfoFactory, DisplayUtils displayUtils, WallpaperQuickSwitchViewModel wallpaperQuickSwitchViewModel, WallpaperInteractor wallpaperInteractor)38     List<CustomizationSectionController<?>> getRevampedUISectionControllersForScreen(
39             Screen screen,
40             FragmentActivity activity,
41             LifecycleOwner lifecycleOwner,
42             WallpaperColorsViewModel wallpaperColorsViewModel,
43             PermissionRequester permissionRequester,
44             WallpaperPreviewNavigator wallpaperPreviewNavigator,
45             CustomizationSectionNavigationController sectionNavigationController,
46             @Nullable Bundle savedInstanceState,
47             CurrentWallpaperInfoFactory wallpaperInfoFactory,
48             DisplayUtils displayUtils,
49             WallpaperQuickSwitchViewModel wallpaperQuickSwitchViewModel,
50             WallpaperInteractor wallpaperInteractor);
51 
52     /**
53      * Gets a new instance of the section controller list.
54      *
55      * Note that the section views will be displayed by the list ordering.
56      *
57      * <p>Don't keep the section controllers as singleton since they contain views.
58      */
getAllSectionControllers( FragmentActivity activity, LifecycleOwner lifecycleOwner, WallpaperColorsViewModel wallpaperColorsViewModel, PermissionRequester permissionRequester, WallpaperPreviewNavigator wallpaperPreviewNavigator, CustomizationSectionNavigationController sectionNavigationController, @Nullable Bundle savedInstanceState, DisplayUtils displayUtils)59     List<CustomizationSectionController<?>> getAllSectionControllers(
60             FragmentActivity activity,
61             LifecycleOwner lifecycleOwner,
62             WallpaperColorsViewModel wallpaperColorsViewModel,
63             PermissionRequester permissionRequester,
64             WallpaperPreviewNavigator wallpaperPreviewNavigator,
65             CustomizationSectionNavigationController sectionNavigationController,
66             @Nullable Bundle savedInstanceState,
67             DisplayUtils displayUtils);
68 }
69