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

Commit b16dfcad authored by Tommy Webb's avatar Tommy Webb Committed by Jan Altensen
Browse files

ThemePicker: Fix crash choosing Live Wallpapers

LivePreviewFragment expects arguments, too.

Issue: LineageOS#5789
Change-Id: I9ec7ff501dba4b4ed3d1747c2593afc7dc949f53
parent 6a6cbde3
Loading
Loading
Loading
Loading
+13 −12
Original line number Diff line number Diff line
@@ -160,9 +160,10 @@ open class ThemePickerInjector : WallpaperPicker2Injector(), CustomizationInject
        viewFullScreen: Boolean,
        testingModeEnabled: Boolean
    ): Fragment {
        return if (wallpaperInfo is LiveWallpaperInfo) LivePreviewFragment()
        else
            ImagePreviewFragment().apply {
        val fragment = if (wallpaperInfo is LiveWallpaperInfo) LivePreviewFragment()
        else ImagePreviewFragment()

        return fragment.apply {
            arguments =
                Bundle().apply {
                    putParcelable(PreviewFragment.ARG_WALLPAPER, wallpaperInfo)