diff options
-rw-r--r-- | src/com/android/customization/module/ThemePickerInjector.kt | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/com/android/customization/module/ThemePickerInjector.kt b/src/com/android/customization/module/ThemePickerInjector.kt index eb20037b..da4d65eb 100644 --- a/src/com/android/customization/module/ThemePickerInjector.kt +++ b/src/com/android/customization/module/ThemePickerInjector.kt @@ -160,18 +160,19 @@ open class ThemePickerInjector : WallpaperPicker2Injector(), CustomizationInject viewFullScreen: Boolean, testingModeEnabled: Boolean ): Fragment { - return if (wallpaperInfo is LiveWallpaperInfo) LivePreviewFragment() - else - ImagePreviewFragment().apply { - arguments = - Bundle().apply { - putParcelable(PreviewFragment.ARG_WALLPAPER, wallpaperInfo) - putInt(PreviewFragment.ARG_PREVIEW_MODE, mode) - putBoolean(PreviewFragment.ARG_VIEW_AS_HOME, viewAsHome) - putBoolean(PreviewFragment.ARG_FULL_SCREEN, viewFullScreen) - putBoolean(PreviewFragment.ARG_TESTING_MODE_ENABLED, testingModeEnabled) - } - } + val fragment = if (wallpaperInfo is LiveWallpaperInfo) LivePreviewFragment() + else ImagePreviewFragment() + + return fragment.apply { + arguments = + Bundle().apply { + putParcelable(PreviewFragment.ARG_WALLPAPER, wallpaperInfo) + putInt(PreviewFragment.ARG_PREVIEW_MODE, mode) + putBoolean(PreviewFragment.ARG_VIEW_AS_HOME, viewAsHome) + putBoolean(PreviewFragment.ARG_FULL_SCREEN, viewFullScreen) + putBoolean(PreviewFragment.ARG_TESTING_MODE_ENABLED, testingModeEnabled) + } + } } @Synchronized |