Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7603e99 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[TP] Preview click opens wallpaper selector [2/3].

Adds click handling to the preview section which opens the full-screen
wallpaper chooser experience.

Fix: 268562476
Test: manually verified that clicking on the preview on the main page
opens the wallpaper screen
Test: manually verified this for home screen tab
Test: manually verified this for lock screen tab
Test: manually verified that, on the lock screen tab, clicking works as
described above, on, or below the clock carousel and that the clock
carousel still handles left/right gestures to change clocks

Change-Id: I8a819730a03992b190830010ddc022eae7e09b30
parent c98daa60
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -118,14 +118,16 @@ public final class DefaultCustomizationSections implements CustomizationSections
                        displayUtils,
                        mClockRegistryProvider,
                        mClockCarouselViewModelProvider,
                        mClockViewFactoryProvider)
                        mClockViewFactoryProvider,
                        sectionNavigationController)
                        : new ScreenPreviewSectionController(
                                activity,
                                lifecycleOwner,
                                screen,
                                wallpaperInfoFactory,
                                wallpaperColorsViewModel,
                                displayUtils));
                                displayUtils,
                                sectionNavigationController));

        sectionControllers.add(
                new ConnectedSectionController(
+7 −4
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import com.android.customization.picker.clock.ui.view.ClockViewFactory
import com.android.customization.picker.clock.ui.viewmodel.ClockCarouselViewModel
import com.android.systemui.shared.clocks.ClockRegistry
import com.android.wallpaper.R
import com.android.wallpaper.model.CustomizationSectionController
import com.android.wallpaper.model.WallpaperColorsViewModel
import com.android.wallpaper.module.CurrentWallpaperInfoFactory
import com.android.wallpaper.module.CustomizationSections
@@ -44,15 +45,16 @@ import kotlinx.coroutines.withContext
/** Controls the screen preview section. */
@OptIn(ExperimentalCoroutinesApi::class)
class PreviewWithClockCarouselSectionController(
    private val activity: Activity,
    activity: Activity,
    private val lifecycleOwner: LifecycleOwner,
    private val initialScreen: CustomizationSections.Screen,
    private val wallpaperInfoFactory: CurrentWallpaperInfoFactory,
    private val colorViewModel: WallpaperColorsViewModel,
    private val displayUtils: DisplayUtils,
    wallpaperInfoFactory: CurrentWallpaperInfoFactory,
    colorViewModel: WallpaperColorsViewModel,
    displayUtils: DisplayUtils,
    private val clockRegistryProvider: ClockRegistryProvider,
    private val clockCarouselViewModelProvider: ClockCarouselViewModelProvider,
    private val clockViewFactoryProvider: ClockViewFactoryProvider,
    navigator: CustomizationSectionController.CustomizationSectionNavigationController,
) :
    ScreenPreviewSectionController(
        activity,
@@ -61,6 +63,7 @@ class PreviewWithClockCarouselSectionController(
        wallpaperInfoFactory,
        colorViewModel,
        displayUtils,
        navigator,
    ) {
    private var clockCarouselBinding: ClockCarouselViewBinder.Binding? = null
    override fun createView(context: Context): ScreenPreviewView {