diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ee96ae3..df680e5 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -8,7 +8,7 @@
     <uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES"/>
     <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
     <uses-permission android:name="android.permission.SET_WALLPAPER_COMPONENT" />
-
+    <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
     <uses-permission android:name="android.permission.MODIFY_DAY_NIGHT_MODE" />
 
     <queries>
@@ -37,6 +37,11 @@
         <intent>
             <action android:name="com.android.launcher3.action.PARTNER_CUSTOMIZATION" />
         </intent>
+        <!-- Intent filter used to query the launcher Activity for grid preview metadata -->
+        <intent>
+            <action android:name="android.intent.action.MAIN" />
+            <category android:name="android.intent.category.HOME" />
+        </intent>
     </queries>
 
     <application
diff --git a/ktfmt_includes.txt b/ktfmt_includes.txt
index 703e852..112b4a1 100644
--- a/ktfmt_includes.txt
+++ b/ktfmt_includes.txt
@@ -1,7 +1,3 @@
 +src/
 +src_override/
 +tests/
--src/com/android/customization/model/color/ColorProvider.kt
--src/com/android/customization/model/color/ColorUtils.kt
--src/com/android/customization/module/SysUiStatsLogger.kt
--src/com/android/customization/picker/clock/ClockSectionView.kt
diff --git a/res/color-night/check_circle_grey_large_not_select_background_color.xml b/res/color-night/check_circle_grey_large_not_select_background_color.xml
index ab5c0cd..32826a7 100644
--- a/res/color-night/check_circle_grey_large_not_select_background_color.xml
+++ b/res/color-night/check_circle_grey_large_not_select_background_color.xml
@@ -14,7 +14,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:color="?androidprv:attr/textColorSecondary" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/text_color_secondary" />
 </selector>
\ No newline at end of file
diff --git a/res/color-night/check_circle_grey_large_not_select_color.xml b/res/color-night/check_circle_grey_large_not_select_color.xml
index 6e8db34..63261b4 100644
--- a/res/color-night/check_circle_grey_large_not_select_color.xml
+++ b/res/color-night/check_circle_grey_large_not_select_color.xml
@@ -14,7 +14,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" >
-    <item android:color="?androidprv:attr/textColorOnAccent" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item android:color="@color/text_color_on_accent" />
 </selector>
\ No newline at end of file
diff --git a/res/color-night/option_background_new_selection_color.xml b/res/color-night/option_background_new_selection_color.xml
index 0158ea2..7455a85 100644
--- a/res/color-night/option_background_new_selection_color.xml
+++ b/res/color-night/option_background_new_selection_color.xml
@@ -14,7 +14,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:color="?androidprv:attr/colorAccentPrimaryVariant" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/color_accent_primary_variant" />
 </selector>
\ No newline at end of file
diff --git a/res/color/check_circle_grey_large_not_select_background_color.xml b/res/color/check_circle_grey_large_not_select_background_color.xml
index c023611..4a8a163 100644
--- a/res/color/check_circle_grey_large_not_select_background_color.xml
+++ b/res/color/check_circle_grey_large_not_select_background_color.xml
@@ -14,7 +14,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:color="?androidprv:attr/textColorSecondaryInverse" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/text_color_secondary_inverse" />
 </selector>
\ No newline at end of file
diff --git a/res/color/check_circle_grey_large_not_select_color.xml b/res/color/check_circle_grey_large_not_select_color.xml
index 252665f..e89678a 100644
--- a/res/color/check_circle_grey_large_not_select_color.xml
+++ b/res/color/check_circle_grey_large_not_select_color.xml
@@ -14,7 +14,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:color="?androidprv:attr/textColorPrimary" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/text_color_primary" />
 </selector>
\ No newline at end of file
diff --git a/res/color/option_background_new_selection_color.xml b/res/color/option_background_new_selection_color.xml
index 0158ea2..7455a85 100644
--- a/res/color/option_background_new_selection_color.xml
+++ b/res/color/option_background_new_selection_color.xml
@@ -14,7 +14,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:color="?androidprv:attr/colorAccentPrimaryVariant" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/color_accent_primary_variant" />
 </selector>
\ No newline at end of file
diff --git a/res/drawable/beta_tag_background.xml b/res/drawable/beta_tag_background.xml
index 8104531..62a5129 100644
--- a/res/drawable/beta_tag_background.xml
+++ b/res/drawable/beta_tag_background.xml
@@ -14,11 +14,10 @@
      limitations under the License.
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
     android:shape="rectangle">
     <size
         android:width="@dimen/beta_tag_background_width"
         android:height="@dimen/beta_tag_background_height" />
     <corners android:radius="@dimen/beta_tag_background_height" />
-    <solid android:color="?androidprv:attr/colorAccentPrimary" />
+    <solid android:color="@color/color_accent_primary" />
 </shape>
\ No newline at end of file
diff --git a/res/drawable/check_circle_grey_large.xml b/res/drawable/check_circle_grey_large.xml
index cf42bf3..f22c910 100644
--- a/res/drawable/check_circle_grey_large.xml
+++ b/res/drawable/check_circle_grey_large.xml
@@ -13,13 +13,12 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
     <item>
         <shape android:shape="oval">
             <size android:width="@dimen/center_check_size"
                 android:height="@dimen/center_check_size" />
-            <solid android:color="?androidprv:attr/colorAccentPrimaryVariant" />
+            <solid android:color="@color/color_accent_primary_variant" />
         </shape>
     </item>
     <item>
diff --git a/res/drawable/check_circle_grey_large_not_select.xml b/res/drawable/check_circle_grey_large_not_select.xml
index 544d852..bba494e 100644
--- a/res/drawable/check_circle_grey_large_not_select.xml
+++ b/res/drawable/check_circle_grey_large_not_select.xml
@@ -13,8 +13,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
     <item>
         <shape android:shape="oval">
             <size android:width="@dimen/center_check_size"
diff --git a/res/drawable/option_border.xml b/res/drawable/option_border.xml
index 6a9d5e9..d0fde5c 100644
--- a/res/drawable/option_border.xml
+++ b/res/drawable/option_border.xml
@@ -14,7 +14,6 @@
      limitations under the License.
 -->
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
     android:color="?android:attr/colorControlHighlight">
     <item android:id="@android:id/mask">
         <shape android:shape="rectangle">
@@ -24,7 +23,7 @@
     </item>
     <item>
         <shape android:shape="rectangle">
-            <solid android:color="?androidprv:attr/colorSurface"/>
+            <solid android:color="@color/color_surface"/>
             <corners android:radius="@dimen/option_tile_radius" />
         </shape>
     </item>
diff --git a/res/drawable/option_border_color.xml b/res/drawable/option_border_color.xml
index ba5097b..cecb001 100644
--- a/res/drawable/option_border_color.xml
+++ b/res/drawable/option_border_color.xml
@@ -14,17 +14,16 @@
      limitations under the License.
 -->
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
     android:color="?android:attr/colorControlHighlight">
     <item android:id="@+id/systempalettecolor">
         <shape android:shape="rectangle">
-            <solid android:color="?androidprv:attr/colorSurface"/>
+            <solid android:color="@color/color_surface"/>
             <corners android:radius="@dimen/option_tile_radius" />
         </shape>
     </item>
     <item android:id="@android:id/mask">
         <shape android:shape="rectangle">
-            <solid android:color="?androidprv:attr/colorSurface"/>
+            <solid android:color="@color/color_surface"/>
             <corners android:radius="@dimen/option_tile_radius" />
         </shape>
     </item>
diff --git a/res/drawable/option_border_new_selection.xml b/res/drawable/option_border_new_selection.xml
index 6c02caa..8045f17 100644
--- a/res/drawable/option_border_new_selection.xml
+++ b/res/drawable/option_border_new_selection.xml
@@ -14,7 +14,6 @@
      limitations under the License.
 -->
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
     android:color="?android:attr/colorControlHighlight">
     <item android:id="@android:id/mask">
         <shape android:shape="rectangle">
diff --git a/res/layout/check_circle_grey_large_not_select_background_color.xml b/res/layout/check_circle_grey_large_not_select_background_color.xml
index c023611..4a8a163 100644
--- a/res/layout/check_circle_grey_large_not_select_background_color.xml
+++ b/res/layout/check_circle_grey_large_not_select_background_color.xml
@@ -14,7 +14,6 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
-    <item android:color="?androidprv:attr/textColorSecondaryInverse" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/text_color_secondary_inverse" />
 </selector>
\ No newline at end of file
diff --git a/res/layout/themed_icon_section_view.xml b/res/layout/themed_icon_section_view.xml
index cf7b842..95be207 100644
--- a/res/layout/themed_icon_section_view.xml
+++ b/res/layout/themed_icon_section_view.xml
@@ -16,7 +16,6 @@
 -->
 <com.android.customization.picker.themedicon.ThemedIconSectionView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:background="?selectableItemBackground"
@@ -63,7 +62,7 @@
         android:paddingHorizontal="8dp"
         android:paddingVertical="4dp"
         android:text="@string/beta_title"
-        android:textColor="?androidprv:attr/textColorOnAccent"
+        android:textColor="@color/text_color_on_accent"
         style="@style/BetaTagTextStyle" />
 
 </com.android.customization.picker.themedicon.ThemedIconSectionView>
diff --git a/src/com/android/customization/model/color/ColorBundle.java b/src/com/android/customization/model/color/ColorBundle.java
index dc5a367..2f2df51 100644
--- a/src/com/android/customization/model/color/ColorBundle.java
+++ b/src/com/android/customization/model/color/ColorBundle.java
@@ -15,18 +15,11 @@
  */
 package com.android.customization.model.color;
 
-import static com.android.customization.model.ResourceConstants.PATH_SIZE;
-
 import android.content.Context;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Color;
-import android.graphics.Path;
 import android.graphics.PorterDuff;
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.ShapeDrawable;
-import android.graphics.drawable.shapes.PathShape;
-import android.text.TextUtils;
 import android.view.View;
 import android.widget.ImageView;
 
@@ -34,16 +27,13 @@
 import androidx.annotation.Dimension;
 import androidx.annotation.NonNull;
 import androidx.annotation.VisibleForTesting;
-import androidx.core.graphics.PathParser;
 
 import com.android.customization.model.ResourceConstants;
 import com.android.systemui.monet.Style;
 import com.android.wallpaper.R;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -103,8 +93,6 @@
         // Monet system palette and accent colors
         @ColorInt public final int primaryColorLight;
         @ColorInt public final int primaryColorDark;
-        public final List<Drawable> icons;
-        public final Drawable shapeDrawable;
         @Dimension
         public final int bottomSheetCornerRadius;
 
@@ -115,14 +103,11 @@
 
         private PreviewInfo(
                 int secondaryColorLight, int secondaryColorDark, int colorSystemPaletteLight,
-                int primaryColorDark, List<Drawable> icons, Drawable shapeDrawable,
-                @Dimension int cornerRadius) {
+                int primaryColorDark, @Dimension int cornerRadius) {
             this.secondaryColorLight = secondaryColorLight;
             this.secondaryColorDark = secondaryColorDark;
             this.primaryColorLight = colorSystemPaletteLight;
             this.primaryColorDark = primaryColorDark;
-            this.icons = icons;
-            this.shapeDrawable = shapeDrawable;
             this.bottomSheetCornerRadius = cornerRadius;
         }
 
@@ -188,7 +173,6 @@
         // System and Monet colors
         @ColorInt private int mPrimaryColorLight = Color.TRANSPARENT;
         @ColorInt private int mPrimaryColorDark = Color.TRANSPARENT;
-        private List<Drawable> mIcons = new ArrayList<>();
         private boolean mIsDefault;
         private Style mStyle = Style.TONAL_SPOT;
         private int mIndex;
@@ -213,26 +197,12 @@
          * @return the {@link PreviewInfo} object
          */
         public PreviewInfo createPreviewInfo(@NonNull Context context) {
-            ShapeDrawable shapeDrawable = null;
             Resources system = context.getResources().getSystem();
-            String pathString = system.getString(
-                    system.getIdentifier(ResourceConstants.CONFIG_ICON_MASK,
-                            "string", ResourceConstants.ANDROID_PACKAGE));
-            Path path = null;
-            if (!TextUtils.isEmpty(pathString)) {
-                path = PathParser.createPathFromPathData(pathString);
-            }
-            if (path != null) {
-                PathShape shape = new PathShape(path, PATH_SIZE, PATH_SIZE);
-                shapeDrawable = new ShapeDrawable(shape);
-                shapeDrawable.setIntrinsicHeight((int) PATH_SIZE);
-                shapeDrawable.setIntrinsicWidth((int) PATH_SIZE);
-            }
             return new PreviewInfo(mSecondaryColorLight,
-                    mSecondaryColorDark, mPrimaryColorLight, mPrimaryColorDark, mIcons,
-                    shapeDrawable, system.getDimensionPixelOffset(
-                    system.getIdentifier(ResourceConstants.CONFIG_CORNERRADIUS,
-                            "dimen", ResourceConstants.ANDROID_PACKAGE)));
+                    mSecondaryColorDark, mPrimaryColorLight, mPrimaryColorDark,
+                    system.getDimensionPixelOffset(
+                            system.getIdentifier(ResourceConstants.CONFIG_CORNERRADIUS, "dimen",
+                                    ResourceConstants.ANDROID_PACKAGE)));
         }
 
         public Map<String, String> getPackages() {
@@ -298,16 +268,6 @@
         }
 
         /**
-         * Sets icon for bundle
-         * @param icon icon in {@link Drawable}
-         * @return this of {@link Builder}
-         */
-        public Builder addIcon(Drawable icon) {
-            mIcons.add(icon);
-            return this;
-        }
-
-        /**
          * Sets overlay package for bundle
          * @param category the category of bundle
          * @param packageName tha name of package in the category
diff --git a/src/com/android/customization/model/color/ColorBundlePreviewExtractor.java b/src/com/android/customization/model/color/ColorBundlePreviewExtractor.java
index b67eec8..55b637f 100644
--- a/src/com/android/customization/model/color/ColorBundlePreviewExtractor.java
+++ b/src/com/android/customization/model/color/ColorBundlePreviewExtractor.java
@@ -15,18 +15,12 @@
  */
 package com.android.customization.model.color;
 
-import static com.android.customization.model.ResourceConstants.ANDROID_PACKAGE;
-import static com.android.customization.model.ResourceConstants.ICONS_FOR_PREVIEW;
 import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_COLOR;
 import static com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_SYSTEM_PALETTE;
 import static com.android.customization.model.color.ColorUtils.toColorString;
 
 import android.content.Context;
 import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.res.Resources;
-import android.content.res.Resources.NotFoundException;
-import android.graphics.drawable.Drawable;
 import android.text.TextUtils;
 import android.util.Log;
 
@@ -80,26 +74,4 @@
         }
         builder.setStyle(s);
     }
-
-    void addAndroidIconOverlay(ColorBundle.Builder builder) throws NameNotFoundException {
-        addSystemDefaultIcons(builder, ICONS_FOR_PREVIEW);
-    }
-
-    void addSystemDefaultIcons(ColorBundle.Builder builder, String... previewIcons) {
-        try {
-            for (String iconName : previewIcons) {
-                builder.addIcon(loadIconPreviewDrawable(iconName));
-            }
-        } catch (NameNotFoundException | NotFoundException e) {
-            Log.w(TAG, "Didn't find android package icons, will skip preview", e);
-        }
-    }
-
-    Drawable loadIconPreviewDrawable(String drawableName)
-            throws NameNotFoundException, NotFoundException {
-        Resources packageRes = mPackageManager.getResourcesForApplication(ANDROID_PACKAGE);
-        Resources res = Resources.getSystem();
-        return res.getDrawable(packageRes.getIdentifier(drawableName, "drawable",
-                        ANDROID_PACKAGE), null);
-    }
 }
diff --git a/src/com/android/customization/model/color/ColorProvider.kt b/src/com/android/customization/model/color/ColorProvider.kt
index a63f904..814a963 100644
--- a/src/com/android/customization/model/color/ColorProvider.kt
+++ b/src/com/android/customization/model/color/ColorProvider.kt
@@ -19,7 +19,6 @@
 import android.content.Context
 import android.content.res.ColorStateList
 import android.content.res.Resources
-import android.text.TextUtils
 import androidx.annotation.ColorInt
 import androidx.core.graphics.ColorUtils.setAlphaComponent
 import androidx.lifecycle.LifecycleOwner
@@ -29,8 +28,8 @@
 import com.android.customization.model.ResourceConstants.COLOR_BUNDLE_MAIN_COLOR_PREFIX
 import com.android.customization.model.ResourceConstants.COLOR_BUNDLE_NAME_PREFIX
 import com.android.customization.model.ResourceConstants.COLOR_BUNDLE_STYLE_PREFIX
-import com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_SYSTEM_PALETTE
 import com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_COLOR
+import com.android.customization.model.ResourceConstants.OVERLAY_CATEGORY_SYSTEM_PALETTE
 import com.android.customization.model.ResourcesApkProvider
 import com.android.customization.model.color.ColorOptionsProvider.COLOR_SOURCE_HOME
 import com.android.customization.model.color.ColorOptionsProvider.COLOR_SOURCE_LOCK
@@ -39,19 +38,18 @@
 import com.android.systemui.monet.Style
 import com.android.wallpaper.compat.WallpaperManagerCompat
 import com.android.wallpaper.module.InjectorProvider
+import java.util.*
 import kotlinx.coroutines.CoroutineScope
 import kotlinx.coroutines.Dispatchers
 import kotlinx.coroutines.SupervisorJob
 import kotlinx.coroutines.launch
 import kotlinx.coroutines.withContext
-import java.util.*
 
 /**
- * Default implementation of {@link ColorOptionsProvider} that reads preset colors from
- * a stub APK.
+ * Default implementation of {@link ColorOptionsProvider} that reads preset colors from a stub APK.
  */
 class ColorProvider(context: Context, stubPackageName: String) :
-        ResourcesApkProvider(context, stubPackageName), ColorOptionsProvider {
+    ResourcesApkProvider(context, stubPackageName), ColorOptionsProvider {
 
     companion object {
         const val themeStyleEnabled = true
@@ -64,36 +62,41 @@
 
     private val monetEnabled = ColorUtils.isMonetEnabled(context)
     // TODO(b/202145216): Use style method to fetch the list of style.
-    private var styleList = if (themeStyleEnabled) arrayOf(
-        Style.TONAL_SPOT, Style.SPRITZ, Style.VIBRANT, Style.EXPRESSIVE
-    ) else arrayOf(Style.TONAL_SPOT)
+    private var styleList =
+        if (themeStyleEnabled)
+            arrayOf(Style.TONAL_SPOT, Style.SPRITZ, Style.VIBRANT, Style.EXPRESSIVE)
+        else arrayOf(Style.TONAL_SPOT)
 
-    private val scope = if (mContext is LifecycleOwner) {
-        mContext.lifecycleScope
-    } else {
-        CoroutineScope(Dispatchers.Default + SupervisorJob())
-    }
+    private val scope =
+        if (mContext is LifecycleOwner) {
+            mContext.lifecycleScope
+        } else {
+            CoroutineScope(Dispatchers.Default + SupervisorJob())
+        }
 
     private var colorsAvailable = true
     private var colorBundles: List<ColorOption>? = null
     private var homeWallpaperColors: WallpaperColors? = null
     private var lockWallpaperColors: WallpaperColors? = null
 
-
     override fun isAvailable(): Boolean {
         return monetEnabled && super.isAvailable() && colorsAvailable
     }
 
-    override fun fetch(callback: OptionsFetchedListener<ColorOption>?, reload: Boolean,
-                       homeWallpaperColors: WallpaperColors?,
-                       lockWallpaperColors: WallpaperColors?) {
-        val wallpaperColorsChanged = this.homeWallpaperColors != homeWallpaperColors
-                || this.lockWallpaperColors != lockWallpaperColors
+    override fun fetch(
+        callback: OptionsFetchedListener<ColorOption>?,
+        reload: Boolean,
+        homeWallpaperColors: WallpaperColors?,
+        lockWallpaperColors: WallpaperColors?
+    ) {
+        val wallpaperColorsChanged =
+            this.homeWallpaperColors != homeWallpaperColors ||
+                this.lockWallpaperColors != lockWallpaperColors
         if (wallpaperColorsChanged) {
             this.homeWallpaperColors = homeWallpaperColors
             this.lockWallpaperColors = lockWallpaperColors
         }
-        if(colorBundles == null || reload || wallpaperColorsChanged) {
+        if (colorBundles == null || reload || wallpaperColorsChanged) {
             scope.launch {
                 try {
                     if (colorBundles == null || reload) {
@@ -119,46 +122,56 @@
         // is the most recently set wallpaper
         val manager = InjectorProvider.getInjector().getWallpaperManagerCompat(mContext)
         return manager.getWallpaperId(WallpaperManagerCompat.FLAG_LOCK) >
-                manager.getWallpaperId(WallpaperManagerCompat.FLAG_SYSTEM)
+            manager.getWallpaperId(WallpaperManagerCompat.FLAG_SYSTEM)
     }
 
-    private fun loadSeedColors(homeWallpaperColors: WallpaperColors?,
-                               lockWallpaperColors: WallpaperColors?) {
+    private fun loadSeedColors(
+        homeWallpaperColors: WallpaperColors?,
+        lockWallpaperColors: WallpaperColors?
+    ) {
         if (homeWallpaperColors == null) return
 
         val bundles: MutableList<ColorOption> = ArrayList()
-        val colorsPerSource = if (lockWallpaperColors == null) {
-            MAX_SEED_COLORS
-        } else {
-            MAX_SEED_COLORS / 2
-        }
+        val colorsPerSource =
+            if (lockWallpaperColors == null) {
+                MAX_SEED_COLORS
+            } else {
+                MAX_SEED_COLORS / 2
+            }
 
         if (lockWallpaperColors != null) {
             val shouldLockColorsGoFirst = isLockScreenWallpaperLastApplied()
             // First half of the colors
             buildColorSeeds(
-                    if (shouldLockColorsGoFirst) lockWallpaperColors else homeWallpaperColors,
-                    colorsPerSource,
-                    if (shouldLockColorsGoFirst) COLOR_SOURCE_LOCK else COLOR_SOURCE_HOME,
-                    true,
-                    bundles)
+                if (shouldLockColorsGoFirst) lockWallpaperColors else homeWallpaperColors,
+                colorsPerSource,
+                if (shouldLockColorsGoFirst) COLOR_SOURCE_LOCK else COLOR_SOURCE_HOME,
+                true,
+                bundles
+            )
             // Second half of the colors
             buildColorSeeds(
-                    if (shouldLockColorsGoFirst) homeWallpaperColors else lockWallpaperColors,
-                    MAX_SEED_COLORS - bundles.size / styleSize,
-                    if (shouldLockColorsGoFirst) COLOR_SOURCE_HOME else COLOR_SOURCE_LOCK,
-                    false,
-                    bundles)
+                if (shouldLockColorsGoFirst) homeWallpaperColors else lockWallpaperColors,
+                MAX_SEED_COLORS - bundles.size / styleSize,
+                if (shouldLockColorsGoFirst) COLOR_SOURCE_HOME else COLOR_SOURCE_LOCK,
+                false,
+                bundles
+            )
         } else {
             buildColorSeeds(homeWallpaperColors, colorsPerSource, COLOR_SOURCE_HOME, true, bundles)
         }
 
-        bundles.addAll(colorBundles?.filterNot{it is ColorSeedOption} ?: emptyList())
+        bundles.addAll(colorBundles?.filterNot { it is ColorSeedOption } ?: emptyList())
         colorBundles = bundles
     }
 
-    private fun buildColorSeeds(wallpaperColors: WallpaperColors, maxColors: Int, source: String,
-                                containsDefault: Boolean, bundles: MutableList<ColorOption>) {
+    private fun buildColorSeeds(
+        wallpaperColors: WallpaperColors,
+        maxColors: Int,
+        source: String,
+        containsDefault: Boolean,
+        bundles: MutableList<ColorOption>
+    ) {
         val seedColors = ColorScheme.getSeedColors(wallpaperColors)
         val defaultSeed = seedColors.first()
         buildBundle(defaultSeed, 0, containsDefault, source, bundles)
@@ -167,19 +180,27 @@
         }
     }
 
-    private fun buildBundle(colorInt: Int, i: Int, isDefault: Boolean, source: String,
-                            bundles: MutableList<ColorOption>) {
+    private fun buildBundle(
+        colorInt: Int,
+        i: Int,
+        isDefault: Boolean,
+        source: String,
+        bundles: MutableList<ColorOption>
+    ) {
         // TODO(b/202145216): Measure time cost in the loop.
         for (style in styleList) {
             val builder = ColorSeedOption.Builder()
             val lightColorScheme = ColorScheme(colorInt, /* darkTheme= */ false, style)
             val darkColorScheme = ColorScheme(colorInt, /* darkTheme= */ true, style)
-            builder.setLightColors(lightColorScheme.getLightColorPreview())
+            builder
+                .setLightColors(lightColorScheme.getLightColorPreview())
                 .setDarkColors(darkColorScheme.getDarkColorPreview())
-                .addOverlayPackage(OVERLAY_CATEGORY_SYSTEM_PALETTE,
+                .addOverlayPackage(
+                    OVERLAY_CATEGORY_SYSTEM_PALETTE,
                     if (isDefault) "" else toColorString(colorInt)
                 )
-                .addOverlayPackage(OVERLAY_CATEGORY_COLOR,
+                .addOverlayPackage(
+                    OVERLAY_CATEGORY_COLOR,
                     if (isDefault) "" else toColorString(colorInt)
                 )
                 .setSource(source)
@@ -194,88 +215,87 @@
     }
 
     /**
-     * Returns the colors for the light theme version of the preview of a ColorScheme
-     * based on this order:
-     * |-------|
-     * | 0 | 1 |
-     * |---+---|
-     * | 2 | 3 |
-     * |-------|
+     * Returns the colors for the light theme version of the preview of a ColorScheme based on this
+     * order: |-------| | 0 | 1 | |---+---| | 2 | 3 | |-------|
      */
     @ColorInt
     private fun ColorScheme.getLightColorPreview(): IntArray {
-        return intArrayOf(setAlphaComponent(this.accent1[2], ALPHA_MASK),
-                setAlphaComponent(this.accent1[2], ALPHA_MASK),
-                ColorStateList.valueOf(this.accent3[6]).withLStar(85f).colors[0],
-                setAlphaComponent(this.accent1[6], ALPHA_MASK))
+        return intArrayOf(
+            setAlphaComponent(this.accent1[2], ALPHA_MASK),
+            setAlphaComponent(this.accent1[2], ALPHA_MASK),
+            ColorStateList.valueOf(this.accent3[6]).withLStar(85f).colors[0],
+            setAlphaComponent(this.accent1[6], ALPHA_MASK)
+        )
     }
 
     /**
-     * Returns the color for the dark theme version of the preview of a ColorScheme
-     * based on this order:
-     * |-------|
-     * | 0 | 1 |
-     * |---+---|
-     * | 2 | 3 |
-     * |-------|
+     * Returns the color for the dark theme version of the preview of a ColorScheme based on this
+     * order: |-------| | 0 | 1 | |---+---| | 2 | 3 | |-------|
      */
     @ColorInt
     private fun ColorScheme.getDarkColorPreview(): IntArray {
-        return intArrayOf(setAlphaComponent(this.accent1[2], ALPHA_MASK),
-                setAlphaComponent(this.accent1[2], ALPHA_MASK),
-                ColorStateList.valueOf(this.accent3[6]).withLStar(85f).colors[0],
-                setAlphaComponent(this.accent1[6], ALPHA_MASK))
+        return intArrayOf(
+            setAlphaComponent(this.accent1[2], ALPHA_MASK),
+            setAlphaComponent(this.accent1[2], ALPHA_MASK),
+            ColorStateList.valueOf(this.accent3[6]).withLStar(85f).colors[0],
+            setAlphaComponent(this.accent1[6], ALPHA_MASK)
+        )
     }
 
     private fun ColorScheme.getPresetColorPreview(seed: Int): IntArray {
-        return when(this.style) {
+        return when (this.style) {
             Style.FRUIT_SALAD -> intArrayOf(seed, this.accent1[2])
             Style.TONAL_SPOT -> intArrayOf(this.accentColor, this.accentColor)
             else -> intArrayOf(this.accent1[2], this.accent1[2])
         }
     }
 
-    private suspend fun loadPreset() = withContext(Dispatchers.IO) {
-        val extractor = ColorBundlePreviewExtractor(mContext)
-        val bundles: MutableList<ColorOption> = ArrayList()
+    private suspend fun loadPreset() =
+        withContext(Dispatchers.IO) {
+            val extractor = ColorBundlePreviewExtractor(mContext)
+            val bundles: MutableList<ColorOption> = ArrayList()
 
-        val bundleNames = getItemsFromStub(COLOR_BUNDLES_ARRAY_NAME)
-        // Color option index value starts from 1.
-        var index = 1
-        val maxPresetColors = if (themeStyleEnabled) bundleNames.size else MAX_PRESET_COLORS
-        for (bundleName in bundleNames.take(maxPresetColors)) {
-            val builder = ColorBundle.Builder()
-            builder.title = getItemStringFromStub(COLOR_BUNDLE_NAME_PREFIX, bundleName)
-            builder.setIndex(index)
-            val colorFromStub = getItemColorFromStub(COLOR_BUNDLE_MAIN_COLOR_PREFIX, bundleName)
-            extractor.addPrimaryColor(builder, colorFromStub)
-            extractor.addSecondaryColor(builder, colorFromStub)
-            if (themeStyleEnabled) {
-                val styleName = try {
-                    getItemStringFromStub(COLOR_BUNDLE_STYLE_PREFIX, bundleName)
-                } catch (e: Resources.NotFoundException) {
-                    null
-                }
-                extractor.addColorStyle(builder, styleName)
-                val style = try {
-                    if (styleName != null) Style.valueOf(styleName) else Style.TONAL_SPOT
-                } catch (e: IllegalArgumentException) {
-                    Style.TONAL_SPOT
+            val bundleNames = getItemsFromStub(COLOR_BUNDLES_ARRAY_NAME)
+            // Color option index value starts from 1.
+            var index = 1
+            val maxPresetColors = if (themeStyleEnabled) bundleNames.size else MAX_PRESET_COLORS
+            for (bundleName in bundleNames.take(maxPresetColors)) {
+                val builder = ColorBundle.Builder()
+                builder.title = getItemStringFromStub(COLOR_BUNDLE_NAME_PREFIX, bundleName)
+                builder.setIndex(index)
+                val colorFromStub = getItemColorFromStub(COLOR_BUNDLE_MAIN_COLOR_PREFIX, bundleName)
+                extractor.addPrimaryColor(builder, colorFromStub)
+                extractor.addSecondaryColor(builder, colorFromStub)
+                if (themeStyleEnabled) {
+                    val styleName =
+                        try {
+                            getItemStringFromStub(COLOR_BUNDLE_STYLE_PREFIX, bundleName)
+                        } catch (e: Resources.NotFoundException) {
+                            null
+                        }
+                    extractor.addColorStyle(builder, styleName)
+                    val style =
+                        try {
+                            if (styleName != null) Style.valueOf(styleName) else Style.TONAL_SPOT
+                        } catch (e: IllegalArgumentException) {
+                            Style.TONAL_SPOT
+                        }
+
+                    val darkColors =
+                        ColorScheme(colorFromStub, true, style).getPresetColorPreview(colorFromStub)
+                    val lightColors =
+                        ColorScheme(colorFromStub, false, style)
+                            .getPresetColorPreview(colorFromStub)
+                    builder.setColorPrimaryDark(darkColors[0]).setColorSecondaryDark(darkColors[1])
+                    builder
+                        .setColorPrimaryLight(lightColors[0])
+                        .setColorSecondaryLight(lightColors[1])
                 }
 
-                val darkColors = ColorScheme(colorFromStub, true, style)
-                        .getPresetColorPreview(colorFromStub)
-                val lightColors = ColorScheme(colorFromStub, false, style)
-                        .getPresetColorPreview(colorFromStub)
-                builder.setColorPrimaryDark(darkColors[0]).setColorSecondaryDark(darkColors[1])
-                builder.setColorPrimaryLight(lightColors[0]).setColorSecondaryLight(lightColors[1])
+                bundles.add(builder.build(mContext))
+                index++
             }
 
-            extractor.addAndroidIconOverlay(builder)
-            bundles.add(builder.build(mContext))
-            index++
+            colorBundles = bundles
         }
-
-        colorBundles = bundles
-    }
 }
diff --git a/src/com/android/customization/model/color/ColorUtils.kt b/src/com/android/customization/model/color/ColorUtils.kt
index f07ff31..9d925e1 100644
--- a/src/com/android/customization/model/color/ColorUtils.kt
+++ b/src/com/android/customization/model/color/ColorUtils.kt
@@ -22,18 +22,14 @@
 import android.util.Log
 import androidx.annotation.ColorInt
 
-/**
- * Utility to wrap Monet's color extraction
- */
+/** Utility to wrap Monet's color extraction */
 object ColorUtils {
     private const val TAG = "ColorUtils"
     private const val MONET_FLAG = "flag_monet"
     private var sSysuiRes: Resources? = null
     private var sFlagId = 0
 
-    /**
-     * Returns true if color extraction is enabled in systemui.
-     */
+    /** Returns true if color extraction is enabled in systemui. */
     @JvmStatic
     fun isMonetEnabled(context: Context): Boolean {
         var monetEnabled = SystemProperties.getBoolean("persist.systemui.flag_monet", false)
@@ -41,8 +37,11 @@
             if (sSysuiRes == null) {
                 try {
                     val pm = context.packageManager
-                    val sysUIInfo = pm.getApplicationInfo("com.android.systemui",
-                            PackageManager.GET_META_DATA or PackageManager.MATCH_SYSTEM_ONLY)
+                    val sysUIInfo =
+                        pm.getApplicationInfo(
+                            "com.android.systemui",
+                            PackageManager.GET_META_DATA or PackageManager.MATCH_SYSTEM_ONLY
+                        )
                     if (sysUIInfo != null) {
                         sSysuiRes = pm.getResourcesForApplication(sysUIInfo)
                     }
@@ -51,8 +50,9 @@
                 }
             }
             if (sFlagId == 0) {
-                sFlagId = if (sSysuiRes == null) 0 else sSysuiRes!!.getIdentifier(
-                        MONET_FLAG, "bool", "com.android.systemui")
+                sFlagId =
+                    if (sSysuiRes == null) 0
+                    else sSysuiRes!!.getIdentifier(MONET_FLAG, "bool", "com.android.systemui")
             }
             if (sFlagId > 0) {
                 monetEnabled = sSysuiRes!!.getBoolean(sFlagId)
@@ -65,4 +65,4 @@
     fun toColorString(@ColorInt color: Int): String {
         return String.format("%06X", 0xFFFFFF and color)
     }
-}
\ No newline at end of file
+}
diff --git a/src/com/android/customization/module/StatsLogUserEventLogger.java b/src/com/android/customization/module/StatsLogUserEventLogger.java
index e3e4336..605c173 100644
--- a/src/com/android/customization/module/StatsLogUserEventLogger.java
+++ b/src/com/android/customization/module/StatsLogUserEventLogger.java
@@ -177,11 +177,14 @@
     }
 
     @Override
-    public void logEffectApply(String effect, @EffectStatus int status) {
+    public void logEffectApply(String effect, @EffectStatus int status, long timeElapsedMillis,
+            int resultCode) {
         new SysUiStatsLogger()
                 .setAction(StyleEnums.WALLPAPER_EFFECT_APPLIED)
                 .setEffectPreference(status)
                 .setEffectIdHash(getIdHashCode(effect))
+                .setTimeElapsed(timeElapsedMillis)
+                .setEffectResultCode(resultCode)
                 .log();
     }
 
diff --git a/src/com/android/customization/module/SysUiStatsLogger.kt b/src/com/android/customization/module/SysUiStatsLogger.kt
index eb3bcc0..318bf1f 100644
--- a/src/com/android/customization/module/SysUiStatsLogger.kt
+++ b/src/com/android/customization/module/SysUiStatsLogger.kt
@@ -19,9 +19,7 @@
 import com.android.systemui.shared.system.SysUiStatsLog
 import com.android.systemui.shared.system.SysUiStatsLog.STYLE_UI_CHANGED
 
-/**
- * The builder for [SysUiStatsLog].
- */
+/** The builder for [SysUiStatsLog]. */
 class SysUiStatsLogger {
 
     private var atom = STYLE_UI_CHANGED
@@ -45,68 +43,84 @@
     private var firstWallpaperApplyDateSinceSetup = 0
     private var appLaunchCount = 0
     private var colorVariant = 0
+    private var timeElapsedMillis = 0L
+    private var effectResultCode = -1
 
-    fun setAction(action: Int) =
-        apply { this.action = action }
+    fun setAction(action: Int) = apply { this.action = action }
 
-    fun setColorPackageHash(color_package_hash: Int) =
-        apply { this.colorPackageHash = color_package_hash }
+    fun setColorPackageHash(color_package_hash: Int) = apply {
+        this.colorPackageHash = color_package_hash
+    }
 
-    fun setFontPackageHash(font_package_hash: Int) =
-        apply { this.fontPackageHash = font_package_hash }
+    fun setFontPackageHash(font_package_hash: Int) = apply {
+        this.fontPackageHash = font_package_hash
+    }
 
-    fun setShapePackageHash(shape_package_hash: Int) =
-        apply { this.shapePackageHash = shape_package_hash }
+    fun setShapePackageHash(shape_package_hash: Int) = apply {
+        this.shapePackageHash = shape_package_hash
+    }
 
-    fun setClockPackageHash(clock_package_hash: Int) =
-        apply { this.clockPackageHash = clock_package_hash }
+    fun setClockPackageHash(clock_package_hash: Int) = apply {
+        this.clockPackageHash = clock_package_hash
+    }
 
-    fun setLauncherGrid(launcher_grid: Int) =
-        apply { this.launcherGrid = launcher_grid }
+    fun setLauncherGrid(launcher_grid: Int) = apply { this.launcherGrid = launcher_grid }
 
-    fun setWallpaperCategoryHash(wallpaper_category_hash: Int) =
-        apply { this.wallpaperCategoryHash = wallpaper_category_hash }
+    fun setWallpaperCategoryHash(wallpaper_category_hash: Int) = apply {
+        this.wallpaperCategoryHash = wallpaper_category_hash
+    }
 
-    fun setWallpaperIdHash(wallpaper_id_hash: Int) =
-        apply { this.wallpaperIdHash = wallpaper_id_hash }
+    fun setWallpaperIdHash(wallpaper_id_hash: Int) = apply {
+        this.wallpaperIdHash = wallpaper_id_hash
+    }
 
-    fun setColorPreference(color_preference: Int) =
-        apply { this.colorPreference = color_preference }
+    fun setColorPreference(color_preference: Int) = apply {
+        this.colorPreference = color_preference
+    }
 
-    fun setLocationPreference(location_preference: Int) =
-        apply { this.locationPreference = location_preference }
+    fun setLocationPreference(location_preference: Int) = apply {
+        this.locationPreference = location_preference
+    }
 
-    fun setDatePreference(date_preference: Int) =
-        apply { this.datePreference = date_preference }
+    fun setDatePreference(date_preference: Int) = apply { this.datePreference = date_preference }
 
-    fun setLaunchedPreference(launched_preference: Int) =
-        apply { this.launchedPreference = launched_preference }
+    fun setLaunchedPreference(launched_preference: Int) = apply {
+        this.launchedPreference = launched_preference
+    }
 
-    fun setEffectPreference(effect_preference: Int) =
-        apply { this.effectPreference = effect_preference }
+    fun setEffectPreference(effect_preference: Int) = apply {
+        this.effectPreference = effect_preference
+    }
 
-    fun setEffectIdHash(effect_id_hash: Int) =
-        apply { this.effectIdHash = effect_id_hash }
+    fun setEffectIdHash(effect_id_hash: Int) = apply { this.effectIdHash = effect_id_hash }
 
-    fun setLockWallpaperCategoryHash(lock_wallpaper_category_hash: Int) =
-        apply { this.lockWallpaperCategoryHash = lock_wallpaper_category_hash }
+    fun setLockWallpaperCategoryHash(lock_wallpaper_category_hash: Int) = apply {
+        this.lockWallpaperCategoryHash = lock_wallpaper_category_hash
+    }
 
-    fun setLockWallpaperIdHash(lock_wallpaper_id_hash: Int) =
-        apply { this.lockWallpaperIdHash = lock_wallpaper_id_hash }
+    fun setLockWallpaperIdHash(lock_wallpaper_id_hash: Int) = apply {
+        this.lockWallpaperIdHash = lock_wallpaper_id_hash
+    }
 
-    fun setFirstLaunchDateSinceSetup(first_launch_date_since_setup: Int) =
-        apply { this.firstLaunchDateSinceSetup = first_launch_date_since_setup }
+    fun setFirstLaunchDateSinceSetup(first_launch_date_since_setup: Int) = apply {
+        this.firstLaunchDateSinceSetup = first_launch_date_since_setup
+    }
 
-    fun setFirstWallpaperApplyDateSinceSetup(first_wallpaper_apply_date_since_setup: Int) =
-        apply {
-            this.firstWallpaperApplyDateSinceSetup = first_wallpaper_apply_date_since_setup
-        }
+    fun setFirstWallpaperApplyDateSinceSetup(first_wallpaper_apply_date_since_setup: Int) = apply {
+        this.firstWallpaperApplyDateSinceSetup = first_wallpaper_apply_date_since_setup
+    }
 
-    fun setAppLaunchCount(app_launch_count: Int) =
-        apply { this.appLaunchCount = app_launch_count }
+    fun setAppLaunchCount(app_launch_count: Int) = apply { this.appLaunchCount = app_launch_count }
 
-    fun setColorVariant(color_variant: Int) =
-        apply { this.colorVariant = color_variant }
+    fun setColorVariant(color_variant: Int) = apply { this.colorVariant = color_variant }
+
+    fun setTimeElapsed(time_elapsed_millis: Long) = apply {
+      this.timeElapsedMillis = time_elapsed_millis
+    }
+
+    fun setEffectResultCode(effect_result_code: Int) = apply {
+        this.effectResultCode = effect_result_code
+    }
 
     fun log() {
         SysUiStatsLog.write(
@@ -130,7 +144,9 @@
             firstLaunchDateSinceSetup,
             firstWallpaperApplyDateSinceSetup,
             appLaunchCount,
-            colorVariant
+            colorVariant,
+            timeElapsedMillis,
+            effectResultCode,
         )
     }
-}
\ No newline at end of file
+}
diff --git a/src/com/android/customization/module/DefaultCustomizationInjector.java b/src/com/android/customization/module/ThemePickerInjector.java
similarity index 62%
rename from src/com/android/customization/module/DefaultCustomizationInjector.java
rename to src/com/android/customization/module/ThemePickerInjector.java
index 220c406..ef2b60a 100644
--- a/src/com/android/customization/module/DefaultCustomizationInjector.java
+++ b/src/com/android/customization/module/ThemePickerInjector.java
@@ -15,9 +15,16 @@
  */
 package com.android.customization.module;
 
+import static com.android.wallpaper.picker.PreviewFragment.ARG_FULL_SCREEN;
+import static com.android.wallpaper.picker.PreviewFragment.ARG_PREVIEW_MODE;
+import static com.android.wallpaper.picker.PreviewFragment.ARG_TESTING_MODE_ENABLED;
+import static com.android.wallpaper.picker.PreviewFragment.ARG_VIEW_AS_HOME;
+import static com.android.wallpaper.picker.PreviewFragment.ARG_WALLPAPER;
+
 import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
+import android.os.Bundle;
 
 import androidx.fragment.app.Fragment;
 import androidx.fragment.app.FragmentActivity;
@@ -25,80 +32,31 @@
 import com.android.customization.model.theme.OverlayManagerCompat;
 import com.android.customization.model.theme.ThemeBundleProvider;
 import com.android.customization.model.theme.ThemeManager;
-import com.android.wallpaper.model.CategoryProvider;
+import com.android.wallpaper.model.LiveWallpaperInfo;
 import com.android.wallpaper.model.WallpaperInfo;
-import com.android.wallpaper.module.BaseWallpaperInjector;
 import com.android.wallpaper.module.CustomizationSections;
-import com.android.wallpaper.module.DefaultCategoryProvider;
-import com.android.wallpaper.module.LoggingOptInStatusProvider;
+import com.android.wallpaper.module.WallpaperPicker2Injector;
 import com.android.wallpaper.module.WallpaperPreferences;
-import com.android.wallpaper.module.WallpaperRotationRefresher;
-import com.android.wallpaper.monitor.PerformanceMonitor;
 import com.android.wallpaper.picker.CustomizationPickerActivity;
+import com.android.wallpaper.picker.ImagePreviewFragment;
+import com.android.wallpaper.picker.LivePreviewFragment;
 import com.android.wallpaper.picker.PreviewFragment;
 
-public class DefaultCustomizationInjector extends BaseWallpaperInjector
+/**
+ * A concrete, real implementation of the dependency provider.
+ */
+public class ThemePickerInjector extends WallpaperPicker2Injector
         implements CustomizationInjector {
-    private CategoryProvider mCategoryProvider;
-    private ThemesUserEventLogger mUserEventLogger;
-    private WallpaperRotationRefresher mWallpaperRotationRefresher;
-    private PerformanceMonitor mPerformanceMonitor;
-    private WallpaperPreferences mPrefs;
     private CustomizationSections mCustomizationSections;
+    private ThemesUserEventLogger mUserEventLogger;
+    private WallpaperPreferences mPrefs;
 
     @Override
-    public synchronized WallpaperPreferences getPreferences(Context context) {
-        if (mPrefs == null) {
-            mPrefs = new DefaultCustomizationPreferences(context.getApplicationContext());
+    public CustomizationSections getCustomizationSections() {
+        if (mCustomizationSections == null) {
+            mCustomizationSections = new DefaultCustomizationSections();
         }
-        return mPrefs;
-    }
-
-    @Override
-    public CustomizationPreferences getCustomizationPreferences(Context context) {
-        return (CustomizationPreferences) getPreferences(context);
-    }
-
-    @Override
-    public synchronized CategoryProvider getCategoryProvider(Context context) {
-        if (mCategoryProvider == null) {
-            mCategoryProvider = new DefaultCategoryProvider(context.getApplicationContext());
-        }
-        return mCategoryProvider;
-    }
-
-    @Override
-    public synchronized ThemesUserEventLogger getUserEventLogger(Context context) {
-        if (mUserEventLogger == null) {
-            mUserEventLogger = new StatsLogUserEventLogger(context);
-        }
-        return mUserEventLogger;
-    }
-
-    @Override
-    public synchronized WallpaperRotationRefresher getWallpaperRotationRefresher() {
-        if (mWallpaperRotationRefresher == null) {
-            mWallpaperRotationRefresher = new WallpaperRotationRefresher() {
-                @Override
-                public void refreshWallpaper(Context context, Listener listener) {
-                    // Not implemented
-                    listener.onError();
-                }
-            };
-        }
-        return mWallpaperRotationRefresher;
-    }
-
-    @Override
-    public Fragment getPreviewFragment(
-            Context context,
-            WallpaperInfo wallpaperInfo,
-            int mode,
-            boolean viewAsHome,
-            boolean viewFullScreen,
-            boolean testingModeEnabled) {
-        return PreviewFragment.newInstance(wallpaperInfo, mode, viewAsHome, viewFullScreen,
-                testingModeEnabled);
+        return mCustomizationSections;
     }
 
     @Override
@@ -116,21 +74,47 @@
     }
 
     @Override
-    public synchronized PerformanceMonitor getPerformanceMonitor() {
-        if (mPerformanceMonitor == null) {
-            mPerformanceMonitor = new PerformanceMonitor() {
-                @Override
-                public void recordFullResPreviewLoadedMemorySnapshot() {
-                    // No Op
-                }
-            };
-        }
-        return mPerformanceMonitor;
+    public Fragment getPreviewFragment(
+            Context context,
+            WallpaperInfo wallpaperInfo,
+            int mode,
+            boolean viewAsHome,
+            boolean viewFullScreen,
+            boolean testingModeEnabled) {
+        Bundle args = new Bundle();
+        args.putParcelable(ARG_WALLPAPER, wallpaperInfo);
+        args.putInt(ARG_PREVIEW_MODE, mode);
+        args.putBoolean(ARG_VIEW_AS_HOME, viewAsHome);
+        args.putBoolean(ARG_FULL_SCREEN, viewFullScreen);
+        args.putBoolean(ARG_TESTING_MODE_ENABLED, testingModeEnabled);
+        PreviewFragment fragment = wallpaperInfo instanceof LiveWallpaperInfo
+                ? new LivePreviewFragment() : new ImagePreviewFragment();
+        fragment.setArguments(args);
+        return fragment;
     }
 
     @Override
-    public synchronized LoggingOptInStatusProvider getLoggingOptInStatusProvider(Context context) {
-        return null;
+    public synchronized ThemesUserEventLogger getUserEventLogger(Context context) {
+        if (mUserEventLogger == null) {
+            mUserEventLogger = new StatsLogUserEventLogger(context);
+        }
+        return mUserEventLogger;
+    }
+
+    @Override
+    public synchronized WallpaperPreferences getPreferences(Context context) {
+        if (mPrefs == null) {
+            mPrefs = new DefaultCustomizationPreferences(context.getApplicationContext());
+        }
+        return mPrefs;
+    }
+
+    //
+    // Functions from {@link CustomizationInjector}
+    //
+    @Override
+    public CustomizationPreferences getCustomizationPreferences(Context context) {
+        return (CustomizationPreferences) getPreferences(context);
     }
 
     @Override
@@ -138,12 +122,4 @@
             OverlayManagerCompat overlayManagerCompat, ThemesUserEventLogger logger) {
         return new ThemeManager(provider, activity, overlayManagerCompat, logger);
     }
-
-    @Override
-    public CustomizationSections getCustomizationSections() {
-        if (mCustomizationSections == null) {
-            mCustomizationSections = new DefaultCustomizationSections();
-        }
-        return mCustomizationSections;
-    }
 }
diff --git a/src/com/android/customization/picker/CustomizationPickerApplication.java b/src/com/android/customization/picker/CustomizationPickerApplication.java
index 79d075a..178cfbf 100644
--- a/src/com/android/customization/picker/CustomizationPickerApplication.java
+++ b/src/com/android/customization/picker/CustomizationPickerApplication.java
@@ -17,7 +17,7 @@
 
 import android.app.Application;
 
-import com.android.customization.module.DefaultCustomizationInjector;
+import com.android.customization.module.ThemePickerInjector;
 import com.android.wallpaper.module.InjectorProvider;
 
 public class CustomizationPickerApplication extends Application {
@@ -26,6 +26,6 @@
         super.onCreate();
 
         // Initialize the injector.
-        InjectorProvider.setInjector(new DefaultCustomizationInjector());
+        InjectorProvider.setInjector(new ThemePickerInjector());
     }
 }
diff --git a/src/com/android/customization/picker/clock/ClockSectionView.kt b/src/com/android/customization/picker/clock/ClockSectionView.kt
index c043209..fac975a 100644
--- a/src/com/android/customization/picker/clock/ClockSectionView.kt
+++ b/src/com/android/customization/picker/clock/ClockSectionView.kt
@@ -19,5 +19,5 @@
 import android.util.AttributeSet
 import com.android.wallpaper.picker.SectionView
 
-/** The [SectionView] for app clock.  */
-class ClockSectionView(context: Context?, attrs: AttributeSet?) : SectionView(context, attrs)
\ No newline at end of file
+/** The [SectionView] for app clock. */
+class ClockSectionView(context: Context?, attrs: AttributeSet?) : SectionView(context, attrs)
diff --git a/src/com/android/customization/picker/grid/GridFragment.java b/src/com/android/customization/picker/grid/GridFragment.java
index c4029d6..d60ebca 100644
--- a/src/com/android/customization/picker/grid/GridFragment.java
+++ b/src/com/android/customization/picker/grid/GridFragment.java
@@ -160,7 +160,7 @@
                 getActivity(), view.findViewById(R.id.wallpaper_preview_image), wallpaperSurface);
         // Loads current Wallpaper.
         CurrentWallpaperInfoFactory factory = InjectorProvider.getInjector()
-                .getCurrentWallpaperFactory(getContext().getApplicationContext());
+                .getCurrentWallpaperInfoFactory(getContext().getApplicationContext());
         factory.createCurrentWallpaperInfos((homeWallpaper, lockWallpaper, presentationMode) -> {
             mHomeWallpaper = homeWallpaper;
             wallpaperPreviewer.setWallpaper(mHomeWallpaper, /* listener= */ null);
diff --git a/src/com/android/customization/picker/theme/CustomThemeNameFragment.java b/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
index 6f20a1a..ea9099f 100644
--- a/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
+++ b/src/com/android/customization/picker/theme/CustomThemeNameFragment.java
@@ -69,7 +69,7 @@
         mTitle = view.findViewById(R.id.component_options_title);
         mTitle.setText(mTitleResId);
         CurrentWallpaperInfoFactory currentWallpaperFactory = InjectorProvider.getInjector()
-                .getCurrentWallpaperFactory(getActivity().getApplicationContext());
+                .getCurrentWallpaperInfoFactory(getActivity().getApplicationContext());
         CustomizationInjector injector = (CustomizationInjector) InjectorProvider.getInjector();
         mCustomizationPreferences = injector.getCustomizationPreferences(getContext());
 
diff --git a/src/com/android/customization/picker/theme/ThemeFragment.java b/src/com/android/customization/picker/theme/ThemeFragment.java
index f5d56ca..3a9a56f 100644
--- a/src/com/android/customization/picker/theme/ThemeFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFragment.java
@@ -115,7 +115,7 @@
         mLoading = view.findViewById(R.id.loading_indicator);
         mError = view.findViewById(R.id.error_section);
         mCurrentWallpaperFactory = InjectorProvider.getInjector()
-                .getCurrentWallpaperFactory(getActivity().getApplicationContext());
+                .getCurrentWallpaperInfoFactory(getActivity().getApplicationContext());
         mOptionsContainer = view.findViewById(R.id.options_container);
 
         mThemeOptionPreviewer = new ThemeOptionPreviewer(
diff --git a/src_override/com/android/wallpaper/module/WallpapersInjector.java b/src_override/com/android/wallpaper/module/WallpapersInjector.java
deleted file mode 100755
index 9f8fe9c..0000000
--- a/src_override/com/android/wallpaper/module/WallpapersInjector.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.wallpaper.module;
-
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-
-import androidx.fragment.app.Fragment;
-
-import com.android.wallpaper.model.CategoryProvider;
-import com.android.wallpaper.model.WallpaperInfo;
-import com.android.wallpaper.monitor.PerformanceMonitor;
-import com.android.wallpaper.picker.CustomizationPickerActivity;
-import com.android.wallpaper.picker.ImagePreviewFragment;
-
-/**
- * A concrete, real implementation of the dependency provider.
- */
-public class WallpapersInjector extends BaseWallpaperInjector {
-    private CategoryProvider mCategoryProvider;
-    private UserEventLogger mUserEventLogger;
-    private WallpaperRotationRefresher mWallpaperRotationRefresher;
-    private PerformanceMonitor mPerformanceMonitor;
-
-    @Override
-    public synchronized CategoryProvider getCategoryProvider(Context context) {
-        if (mCategoryProvider == null) {
-            mCategoryProvider = new DefaultCategoryProvider(context.getApplicationContext());
-        }
-        return mCategoryProvider;
-    }
-
-    @Override
-    public synchronized UserEventLogger getUserEventLogger(Context context) {
-        if (mUserEventLogger == null) {
-            mUserEventLogger = new NoOpUserEventLogger();
-        }
-        return mUserEventLogger;
-    }
-
-    @Override
-    public synchronized WallpaperRotationRefresher getWallpaperRotationRefresher() {
-        if (mWallpaperRotationRefresher == null) {
-            mWallpaperRotationRefresher = new WallpaperRotationRefresher() {
-                @Override
-                public void refreshWallpaper(Context context, Listener listener) {
-                    // Not implemented
-                    listener.onError();
-                }
-            };
-        }
-        return mWallpaperRotationRefresher;
-    }
-
-    @Override
-    public Fragment getPreviewFragment(
-            Context context,
-            WallpaperInfo wallpaperInfo,
-            int mode,
-            boolean viewAsHome,
-            boolean viewFullScreen,
-            boolean testingModeEnabled) {
-        return ImagePreviewFragment.newInstance(wallpaperInfo, mode, viewAsHome, viewFullScreen,
-                testingModeEnabled);
-    }
-
-    @Override
-    public Intent getDeepLinkRedirectIntent(Context context, Uri uri) {
-        Intent intent = new Intent();
-        intent.setClass(context, CustomizationPickerActivity.class);
-        intent.setData(uri);
-        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
-        return intent;
-    }
-
-    @Override
-    public synchronized PerformanceMonitor getPerformanceMonitor() {
-        if (mPerformanceMonitor == null) {
-            mPerformanceMonitor = new PerformanceMonitor() {
-                @Override
-                public void recordFullResPreviewLoadedMemorySnapshot() {
-                    // No Op
-                }
-            };
-        }
-        return mPerformanceMonitor;
-    }
-
-    @Override
-    public synchronized LoggingOptInStatusProvider getLoggingOptInStatusProvider(Context context) {
-        return null;
-    }
-
-    @Override
-    public String getDownloadableIntentAction() {
-        return null;
-    }
-}
