diff --git a/res/values/strings.xml b/res/values/strings.xml
index f0578cd16e..484b7d11d6 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -551,4 +551,16 @@
Install apps to Private Space
Add files and more to Private Space
+
+
+
+ Circle
+
+ Square
+
+ 4-sided cookie
+
+ 7-sided cookie
+
+ Arch
diff --git a/src/com/android/launcher3/graphics/GridCustomizationsProxy.java b/src/com/android/launcher3/graphics/GridCustomizationsProxy.java
index d8a10c16bd..2103862736 100644
--- a/src/com/android/launcher3/graphics/GridCustomizationsProxy.java
+++ b/src/com/android/launcher3/graphics/GridCustomizationsProxy.java
@@ -178,7 +178,7 @@ public class GridCustomizationsProxy implements ProxyProvider {
for (IconShapeModel shape : ShapesProvider.INSTANCE.getIconShapes()) {
cursor.newRow()
.add(KEY_SHAPE_KEY, shape.getKey())
- .add(KEY_SHAPE_TITLE, shape.getTitle())
+ .add(KEY_SHAPE_TITLE, mContext.getString(shape.getTitleId()))
.add(KEY_PATH, shape.getPathString())
.add(KEY_IS_DEFAULT, shape.getKey().equals(currentShape));
}
diff --git a/src/com/android/launcher3/shapes/IconShapeModel.kt b/src/com/android/launcher3/shapes/IconShapeModel.kt
index fc49adc3ef..39cf49cb5f 100644
--- a/src/com/android/launcher3/shapes/IconShapeModel.kt
+++ b/src/com/android/launcher3/shapes/IconShapeModel.kt
@@ -16,9 +16,11 @@
package com.android.launcher3.shapes
+import androidx.annotation.StringRes
+
data class IconShapeModel(
val key: String,
- val title: String,
+ @StringRes val titleId: Int,
val pathString: String,
val folderPathString: String = pathString,
val iconScale: Float = 1f,
diff --git a/src/com/android/launcher3/shapes/ShapesProvider.kt b/src/com/android/launcher3/shapes/ShapesProvider.kt
index 03e30d8f77..2a4048c0d5 100644
--- a/src/com/android/launcher3/shapes/ShapesProvider.kt
+++ b/src/com/android/launcher3/shapes/ShapesProvider.kt
@@ -18,6 +18,7 @@ package com.android.launcher3.shapes
import androidx.annotation.VisibleForTesting
import com.android.launcher3.Flags as LauncherFlags
+import com.android.launcher3.R
import com.android.systemui.shared.Flags
object ShapesProvider {
@@ -44,43 +45,49 @@ object ShapesProvider {
@VisibleForTesting const val SEVEN_SIDED_COOKIE_KEY = "seven_sided_cookie"
@VisibleForTesting const val ARCH_KEY = "arch"
- val iconShapes =
+ val iconShapes: Array =
if (Flags.newCustomizationPickerUi() && LauncherFlags.enableLauncherIconShapes()) {
arrayOf(
IconShapeModel(
key = CIRCLE_KEY,
- title = "circle",
+ titleId = R.string.circle_shape_title,
pathString = CIRCLE_PATH,
folderPathString = FOLDER_CLOVER_PATH,
),
IconShapeModel(
key = SQUARE_KEY,
- title = "square",
+ titleId = R.string.square_shape_title,
pathString = SQUARE_PATH,
folderPathString = FOLDER_SQUARE_PATH,
),
IconShapeModel(
key = FOUR_SIDED_COOKIE_KEY,
- title = "4 sided cookie",
+ titleId = R.string.four_sided_cookie_shape_title,
pathString = FOUR_SIDED_COOKIE_PATH,
folderPathString = FOLDER_COMPLEX_CLOVER_PATH,
iconScale = 72f / 83.4f,
),
IconShapeModel(
key = SEVEN_SIDED_COOKIE_KEY,
- title = "7 sided cookie",
+ titleId = R.string.seven_sided_cookie_shape_title,
pathString = SEVEN_SIDED_COOKIE_PATH,
folderPathString = FOLDER_CLOVER_PATH,
iconScale = 72f / 80f,
),
IconShapeModel(
key = ARCH_KEY,
- title = "arch",
+ titleId = R.string.arch_shape_title,
pathString = ARCH_PATH,
folderPathString = FOLDER_ARCH_PATH,
),
)
} else {
- arrayOf(IconShapeModel(key = CIRCLE_KEY, title = "circle", pathString = CIRCLE_PATH))
+ arrayOf(
+ IconShapeModel(
+ key = CIRCLE_KEY,
+ titleId = R.string.circle_shape_title,
+ pathString = CIRCLE_PATH,
+ )
+ )
}
}