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

Commit 0d2cb9f4 authored by George Lin's avatar George Lin
Browse files

Remove unused preview arguments (2/3)

Test: Build success
Bug: 290833019
Change-Id: I430d3a1b49af8c1da281fe7ac74278aabc118fce
parent dec71e29
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
@@ -21,10 +21,8 @@ import android.content.Context
import android.content.Intent
import android.content.res.Resources
import android.net.Uri
import android.os.Bundle
import android.text.TextUtils
import androidx.activity.ComponentActivity
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
@@ -73,17 +71,12 @@ import com.android.systemui.shared.customization.data.content.CustomizationProvi
import com.android.wallpaper.config.BaseFlags
import com.android.wallpaper.dispatchers.BackgroundDispatcher
import com.android.wallpaper.dispatchers.MainDispatcher
import com.android.wallpaper.model.LiveWallpaperInfo
import com.android.wallpaper.model.WallpaperColorsViewModel
import com.android.wallpaper.model.WallpaperInfo
import com.android.wallpaper.module.CustomizationSections
import com.android.wallpaper.module.FragmentFactory
import com.android.wallpaper.module.UserEventLogger
import com.android.wallpaper.module.WallpaperPicker2Injector
import com.android.wallpaper.picker.CustomizationPickerActivity
import com.android.wallpaper.picker.ImagePreviewFragment
import com.android.wallpaper.picker.LivePreviewFragment
import com.android.wallpaper.picker.PreviewFragment
import com.android.wallpaper.picker.customization.data.content.WallpaperClientImpl
import com.android.wallpaper.picker.customization.data.repository.WallpaperRepository
import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor
@@ -173,29 +166,6 @@ internal constructor(
        return null
    }

    override fun getPreviewFragment(
        context: Context,
        wallpaperInfo: WallpaperInfo,
        mode: Int,
        viewAsHome: Boolean,
        viewFullScreen: Boolean,
        testingModeEnabled: Boolean,
        isAssetIdPresent: 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)
                    }
            }
    }

    @Synchronized
    override fun getUserEventLogger(context: Context): ThemesUserEventLogger {
        return userEventLogger as? ThemesUserEventLogger