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

Commit dc9c65f9 authored by Chris Poultney's avatar Chris Poultney
Browse files

Fixes preview on home/lock tabs when wallpaper is live for both screens

See b/286954242#comment4 for approach and explanation

Bug: b/286954242
Test: tested entering and leaving previews repeatedly
Test: checked previews of live, emoji, and cinematic
Change-Id: I98c368fb0efde9faafd80a907bdaf66aa5ce4ed0
parent f1b765d6
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import com.android.customization.picker.clock.ui.view.ClockCarouselView
import com.android.customization.picker.clock.ui.view.ClockViewFactory
import com.android.customization.picker.clock.ui.viewmodel.ClockCarouselViewModel
import com.android.wallpaper.R
import com.android.wallpaper.model.CustomizationSectionController
import com.android.wallpaper.model.CustomizationSectionController.CustomizationSectionNavigationController
import com.android.wallpaper.model.WallpaperColorsViewModel
import com.android.wallpaper.model.WallpaperPreviewNavigator
@@ -101,8 +102,11 @@ class PreviewWithClockCarouselSectionController(

    override val hideLockScreenClockPreview = true

    override fun createView(context: Context): ScreenPreviewView {
        val view = super.createView(context)
    override fun createView(
        context: Context,
        params: CustomizationSectionController.ViewCreationParams,
    ): ScreenPreviewView {
        val view = super.createView(context, params)
        if (screen == CustomizationSections.Screen.LOCK_SCREEN) {
            val screenPreviewClickView: ScreenPreviewClickView =
                view.findViewById(R.id.screen_preview_click_view)