Loading res/layout/color_option_no_background.xml +2 −1 Original line number Diff line number Diff line Loading @@ -52,5 +52,6 @@ android:layout_height="match_parent" android:adjustViewBounds="true" android:src="@drawable/color_option_selected_no_background" android:visibility="gone"/> android:visibility="gone" android:importantForAccessibility="no" /> </androidx.constraintlayout.widget.ConstraintLayout> res/layout/color_option_overflow_no_background.xml +2 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:src="@drawable/color_overflow" /> android:src="@drawable/color_overflow" android:contentDescription="@string/more_colors"/> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> res/values/strings.xml +32 −0 Original line number Diff line number Diff line Loading @@ -455,6 +455,38 @@ --> <string name="more_colors">More Colors</string> <!-- Accessibility string for a button that allows the user to select a color scheme generated from their current wallpaper as the system color. This is shown in a list with other color options. [CHAR LIMIT=NONE]. --> <string name="content_description_dynamic_color_option">Primary dynamic theme</string> <!-- Accessibility string for a button that allows the user to select a color scheme generated from their current wallpaper as the system color. This is shown in a list with other color options. [CHAR LIMIT=NONE]. --> <string name="content_description_neutral_color_option">Primary neutral theme</string> <!-- Accessibility string for a button that allows the user to select a color scheme generated from their current wallpaper as the system color. This is shown in a list with other color options. [CHAR LIMIT=NONE]. --> <string name="content_description_vibrant_color_option">Primary vibrant theme</string> <!-- Accessibility string for a button that allows the user to select a color scheme generated from their current wallpaper as the system color. This is shown in a list with other color options. [CHAR LIMIT=NONE]. --> <string name="content_description_expressive_color_option">Primary expressive theme</string> <!-- Accessibility string for a button that allows the user to select the default color for their lock screen clock on the device. This is shown next to other buttons that allow the user to Loading src/com/android/customization/model/color/ColorOptionImpl.kt +1 −4 Original line number Diff line number Diff line Loading @@ -61,10 +61,7 @@ class ColorOptionImpl( } override fun getContentDescription(context: Context): CharSequence? { if (type == ColorType.WALLPAPER_COLOR) { return context.getString(R.string.wallpaper_color_title) } return super.getContentDescription(context) return title } override fun getSource(): String? { Loading src/com/android/customization/model/color/ColorProvider.kt +14 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.customization.model.color.ColorUtils.toColorString import com.android.customization.picker.color.shared.model.ColorType import com.android.systemui.monet.ColorScheme import com.android.systemui.monet.Style import com.android.wallpaper.R import com.android.wallpaper.compat.WallpaperManagerCompat import com.android.wallpaper.module.InjectorProvider import kotlinx.coroutines.CoroutineScope Loading @@ -48,7 +49,7 @@ import kotlinx.coroutines.withContext /** * Default implementation of {@link ColorOptionsProvider} that reads preset colors from a stub APK. */ class ColorProvider(context: Context, stubPackageName: String) : class ColorProvider(private val context: Context, stubPackageName: String) : ResourcesApkProvider(context, stubPackageName), ColorOptionsProvider { companion object { Loading Loading @@ -244,6 +245,18 @@ class ColorProvider(context: Context, stubPackageName: String) : OVERLAY_CATEGORY_SYSTEM_PALETTE, if (isDefault) "" else toColorString(colorInt) ) builder.title = when (style) { Style.TONAL_SPOT -> context.getString(R.string.content_description_dynamic_color_option) Style.SPRITZ -> context.getString(R.string.content_description_neutral_color_option) Style.VIBRANT -> context.getString(R.string.content_description_vibrant_color_option) Style.EXPRESSIVE -> context.getString(R.string.content_description_expressive_color_option) else -> context.getString(R.string.content_description_dynamic_color_option) } builder.source = source builder.style = style // Color option index value starts from 1. Loading Loading
res/layout/color_option_no_background.xml +2 −1 Original line number Diff line number Diff line Loading @@ -52,5 +52,6 @@ android:layout_height="match_parent" android:adjustViewBounds="true" android:src="@drawable/color_option_selected_no_background" android:visibility="gone"/> android:visibility="gone" android:importantForAccessibility="no" /> </androidx.constraintlayout.widget.ConstraintLayout>
res/layout/color_option_overflow_no_background.xml +2 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:adjustViewBounds="true" android:src="@drawable/color_overflow" /> android:src="@drawable/color_overflow" android:contentDescription="@string/more_colors"/> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
res/values/strings.xml +32 −0 Original line number Diff line number Diff line Loading @@ -455,6 +455,38 @@ --> <string name="more_colors">More Colors</string> <!-- Accessibility string for a button that allows the user to select a color scheme generated from their current wallpaper as the system color. This is shown in a list with other color options. [CHAR LIMIT=NONE]. --> <string name="content_description_dynamic_color_option">Primary dynamic theme</string> <!-- Accessibility string for a button that allows the user to select a color scheme generated from their current wallpaper as the system color. This is shown in a list with other color options. [CHAR LIMIT=NONE]. --> <string name="content_description_neutral_color_option">Primary neutral theme</string> <!-- Accessibility string for a button that allows the user to select a color scheme generated from their current wallpaper as the system color. This is shown in a list with other color options. [CHAR LIMIT=NONE]. --> <string name="content_description_vibrant_color_option">Primary vibrant theme</string> <!-- Accessibility string for a button that allows the user to select a color scheme generated from their current wallpaper as the system color. This is shown in a list with other color options. [CHAR LIMIT=NONE]. --> <string name="content_description_expressive_color_option">Primary expressive theme</string> <!-- Accessibility string for a button that allows the user to select the default color for their lock screen clock on the device. This is shown next to other buttons that allow the user to Loading
src/com/android/customization/model/color/ColorOptionImpl.kt +1 −4 Original line number Diff line number Diff line Loading @@ -61,10 +61,7 @@ class ColorOptionImpl( } override fun getContentDescription(context: Context): CharSequence? { if (type == ColorType.WALLPAPER_COLOR) { return context.getString(R.string.wallpaper_color_title) } return super.getContentDescription(context) return title } override fun getSource(): String? { Loading
src/com/android/customization/model/color/ColorProvider.kt +14 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.customization.model.color.ColorUtils.toColorString import com.android.customization.picker.color.shared.model.ColorType import com.android.systemui.monet.ColorScheme import com.android.systemui.monet.Style import com.android.wallpaper.R import com.android.wallpaper.compat.WallpaperManagerCompat import com.android.wallpaper.module.InjectorProvider import kotlinx.coroutines.CoroutineScope Loading @@ -48,7 +49,7 @@ import kotlinx.coroutines.withContext /** * Default implementation of {@link ColorOptionsProvider} that reads preset colors from a stub APK. */ class ColorProvider(context: Context, stubPackageName: String) : class ColorProvider(private val context: Context, stubPackageName: String) : ResourcesApkProvider(context, stubPackageName), ColorOptionsProvider { companion object { Loading Loading @@ -244,6 +245,18 @@ class ColorProvider(context: Context, stubPackageName: String) : OVERLAY_CATEGORY_SYSTEM_PALETTE, if (isDefault) "" else toColorString(colorInt) ) builder.title = when (style) { Style.TONAL_SPOT -> context.getString(R.string.content_description_dynamic_color_option) Style.SPRITZ -> context.getString(R.string.content_description_neutral_color_option) Style.VIBRANT -> context.getString(R.string.content_description_vibrant_color_option) Style.EXPRESSIVE -> context.getString(R.string.content_description_expressive_color_option) else -> context.getString(R.string.content_description_dynamic_color_option) } builder.source = source builder.style = style // Color option index value starts from 1. Loading