diff --git a/src/com/android/customization/model/theme/DefaultThemeProvider.java b/src/com/android/customization/model/theme/DefaultThemeProvider.java
index 60eb66d..52a56e1 100644
--- a/src/com/android/customization/model/theme/DefaultThemeProvider.java
+++ b/src/com/android/customization/model/theme/DefaultThemeProvider.java
@@ -31,6 +31,7 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources.NotFoundException;
+import android.graphics.drawable.Drawable;
 import android.text.TextUtils;
 import android.util.Log;
 
@@ -209,20 +210,23 @@
             Log.d(TAG, "Didn't find shape overlay for default theme, will use system default");
             mOverlayProvider.addSystemDefaultShape(builder);
         }
+
+        List<Drawable> icons = new ArrayList<>();
+        List<String> names = new ArrayList<>();
         for (String packageName : mOverlayProvider.getShapePreviewIconPackages()) {
             try {
-                builder.addShapePreviewIcon(
-                        mContext.getPackageManager().getApplicationIcon(packageName));
-                // Add the shape icon app name.
+                icons.add(mContext.getPackageManager().getApplicationIcon(packageName));
                 ApplicationInfo appInfo = mContext.getPackageManager()
                         .getApplicationInfo(packageName, /* flag= */ 0);
-                builder.addShapePreviewIconName(
-                        String.valueOf(mContext.getPackageManager().getApplicationLabel(appInfo)));
+                names.add(String.valueOf(
+                        mContext.getPackageManager().getApplicationLabel(appInfo)));
             } catch (NameNotFoundException e) {
                 Log.d(TAG, "Couldn't find app " + packageName + ", won't use it for icon shape"
                         + "preview");
             }
         }
+        builder.setShapePreviewIcons(icons);
+        builder.setShapePreviewIconNames(names);
 
         try {
             String iconAndroidOverlayPackage = getOverlayPackage(ICON_ANDROID_PREFIX,
diff --git a/src/com/android/customization/model/theme/OverlayThemeExtractor.java b/src/com/android/customization/model/theme/OverlayThemeExtractor.java
index f1698f6..389e514 100644
--- a/src/com/android/customization/model/theme/OverlayThemeExtractor.java
+++ b/src/com/android/customization/model/theme/OverlayThemeExtractor.java
@@ -25,7 +25,9 @@
 import com.android.customization.model.theme.ThemeBundle.Builder;
 import com.android.wallpaper.R;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.function.Consumer;
 
@@ -98,21 +100,23 @@
     }
 
     private void addShapePreviewIcons(Builder builder) {
+        List<Drawable> icons = new ArrayList<>();
+        List<String> names = new ArrayList<>();
         for (String packageName : mShapePreviewIconPackages) {
             try {
-                builder.addShapePreviewIcon(
-                        mContext.getPackageManager().getApplicationIcon(
-                                packageName));
+                icons.add(mContext.getPackageManager().getApplicationIcon(packageName));
                 // Add the shape icon app name.
                 ApplicationInfo appInfo = mContext.getPackageManager()
                         .getApplicationInfo(packageName, /* flag= */ 0);
-                builder.addShapePreviewIconName(
-                        String.valueOf(mContext.getPackageManager().getApplicationLabel(appInfo)));
+                names.add(String.valueOf(
+                        mContext.getPackageManager().getApplicationLabel(appInfo)));
             } catch (NameNotFoundException e) {
                 Log.d(TAG, "Couldn't find app " + packageName
                         + ", won't use it for icon shape preview");
             }
         }
+        builder.setShapePreviewIcons(icons);
+        builder.setShapePreviewIconNames(names);
     }
 
     void addNoPreviewIconOverlay(Builder builder, String overlayPackage) {
diff --git a/src/com/android/customization/model/theme/ThemeBundle.java b/src/com/android/customization/model/theme/ThemeBundle.java
index 9928c76..8f15e6d 100644
--- a/src/com/android/customization/model/theme/ThemeBundle.java
+++ b/src/com/android/customization/model/theme/ThemeBundle.java
@@ -387,13 +387,15 @@
             return this;
         }
 
-        public Builder addShapePreviewIcon(Drawable appIcon) {
-            mAppIcons.add(appIcon);
+        public Builder setShapePreviewIcons(List<Drawable> appIcons) {
+            mAppIcons.clear();
+            mAppIcons.addAll(appIcons);
             return this;
         }
 
-        public Builder addShapePreviewIconName(String appIconName) {
-            mAppIconNames.add(appIconName);
+        public Builder setShapePreviewIconNames(List<String> appIconNames) {
+            mAppIconNames.clear();
+            mAppIconNames.addAll(appIconNames);
             return this;
         }
 
diff --git a/src/com/android/customization/model/theme/custom/ShapeOptionsProvider.java b/src/com/android/customization/model/theme/custom/ShapeOptionsProvider.java
index 2206ff4..7357607 100644
--- a/src/com/android/customization/model/theme/custom/ShapeOptionsProvider.java
+++ b/src/com/android/customization/model/theme/custom/ShapeOptionsProvider.java
@@ -22,6 +22,7 @@
 import static com.android.customization.model.ResourceConstants.PATH_SIZE;
 
 import android.content.Context;
+import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources;
@@ -36,6 +37,7 @@
 
 import androidx.annotation.Dimension;
 import androidx.core.graphics.PathParser;
+import androidx.core.util.Pair;
 
 import com.android.customization.model.ResourceConstants;
 import com.android.customization.model.theme.OverlayManagerCompat;
@@ -74,8 +76,11 @@
                 ShapeDrawable shapeDrawable = createShapeDrawable(path);
                 PackageManager pm = mContext.getPackageManager();
                 String label = pm.getApplicationInfo(overlayPackage, 0).loadLabel(pm).toString();
+                Pair<List<Drawable>, List<String>> shapedIconsAndNames =
+                        getShapedIconsAndNames(path);
                 mOptions.add(new ShapeOption(overlayPackage, label, path,
-                        loadCornerRadius(overlayPackage), shapeDrawable, getShapedIcons(path)));
+                        loadCornerRadius(overlayPackage), shapeDrawable, shapedIconsAndNames.first,
+                        shapedIconsAndNames.second));
             } catch (NameNotFoundException | NotFoundException e) {
                 Log.w(TAG, String.format("Couldn't load shape overlay %s, will skip it",
                         overlayPackage), e);
@@ -87,11 +92,12 @@
         Resources system = Resources.getSystem();
         Path path = loadPath(system, ANDROID_PACKAGE);
         ShapeDrawable shapeDrawable = createShapeDrawable(path);
+        Pair<List<Drawable>, List<String>> shapedIconsAndNames = getShapedIconsAndNames(path);
         mOptions.add(new ShapeOption(null, mContext.getString(R.string.default_theme_title), path,
                 system.getDimensionPixelOffset(
                     system.getIdentifier(ResourceConstants.CONFIG_CORNERRADIUS,
                         "dimen", ResourceConstants.ANDROID_PACKAGE)),
-                shapeDrawable, getShapedIcons(path)));
+                shapeDrawable, shapedIconsAndNames.first, shapedIconsAndNames.second));
     }
 
     private ShapeDrawable createShapeDrawable(Path path) {
@@ -102,8 +108,9 @@
         return shapeDrawable;
     }
 
-    private List<Drawable> getShapedIcons(Path path) {
+    private Pair<List<Drawable>, List<String>> getShapedIconsAndNames(Path path) {
         List<Drawable> icons = new ArrayList<>();
+        List<String> names = new ArrayList<>();
         for (String packageName : mShapePreviewIconPackages) {
             try {
                 Drawable appIcon = mContext.getPackageManager().getApplicationIcon(packageName);
@@ -111,13 +118,18 @@
                     AdaptiveIconDrawable adaptiveIcon = (AdaptiveIconDrawable) appIcon;
                     icons.add(new DynamicAdaptiveIconDrawable(adaptiveIcon.getBackground(),
                             adaptiveIcon.getForeground(), path));
+
+                    ApplicationInfo appInfo = mContext.getPackageManager()
+                            .getApplicationInfo(packageName, /* flag= */ 0);
+                    names.add(String.valueOf(
+                            mContext.getPackageManager().getApplicationLabel(appInfo)));
                 }
             } catch (NameNotFoundException e) {
                 Log.d(TAG, "Couldn't find app " + packageName
                         + ", won't use it for icon shape preview");
             }
         }
-        return icons;
+        return Pair.create(icons, names);
     }
 
     private Path loadPath(Resources overlayRes, String packageName) {
diff --git a/src/com/android/customization/model/theme/custom/ThemeComponentOption.java b/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
index 6583433..fed641f 100644
--- a/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
+++ b/src/com/android/customization/model/theme/custom/ThemeComponentOption.java
@@ -417,6 +417,7 @@
 
         private final LayerDrawable mShape;
         private final List<Drawable> mAppIcons;
+        private final List<String> mAppIconNames;
         private final String mLabel;
         private final Path mPath;
         private final int mCornerRadius;
@@ -427,10 +428,11 @@
 
         ShapeOption(String packageName, String label, Path path,
                 @Dimension int cornerRadius, Drawable shapeDrawable,
-                List<Drawable> appIcons) {
+                List<Drawable> appIcons, List<String> appIconNames) {
             addOverlayPackage(OVERLAY_CATEGORY_SHAPE, packageName);
             mLabel = label;
             mAppIcons = appIcons;
+            mAppIconNames = appIconNames;
             mPath = path;
             mCornerRadius = cornerRadius;
             Drawable background = shapeDrawable.getConstantState().newDrawable();
@@ -495,10 +497,10 @@
 
         @Override
         public Builder buildStep(Builder builder) {
-            builder.setShapePath(mPath).setBottomSheetCornerRadius(mCornerRadius);
-            for (Drawable appIcon : mAppIcons) {
-                builder.addShapePreviewIcon(appIcon);
-            }
+            builder.setShapePath(mPath)
+                    .setBottomSheetCornerRadius(mCornerRadius)
+                    .setShapePreviewIcons(mAppIcons)
+                    .setShapePreviewIconNames(mAppIconNames);
             return super.buildStep(builder);
         }
     }
