Skip to content

Commit 66b1c0e

Browse files
Material Design Teamjosefigueroa168
authored andcommitted
[M3][Colors] Add supporting brand list of dynamic colors
PiperOrigin-RevId: 413825567 (cherry picked from commit b2f05d5)
1 parent 287858a commit 66b1c0e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/java/com/google/android/material/color/DynamicColors.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public class DynamicColors {
4949
"infinix mobility limited", "hmd global", "sharp", "sony", "tcl", "lenovo", "google",
5050
"robolectric"));
5151

52+
private static final Set<String> DYNAMIC_COLOR_SUPPORTED_BRANDS =
53+
new HashSet<>(Arrays.asList("jio"));
54+
5255
private static final int USE_DEFAULT_THEME_OVERLAY = 0;
5356

5457
private static final Precondition ALWAYS_ALLOW = new Precondition() {
@@ -221,7 +224,8 @@ public static Context wrapContextIfAvailable(
221224
@ChecksSdkIntAtLeast(api = VERSION_CODES.S)
222225
public static boolean isDynamicColorAvailable() {
223226
return VERSION.SDK_INT >= VERSION_CODES.S
224-
&& DYNAMIC_COLOR_SUPPORTED_MANUFACTURERS.contains(Build.MANUFACTURER.toLowerCase());
227+
&& (DYNAMIC_COLOR_SUPPORTED_MANUFACTURERS.contains(Build.MANUFACTURER.toLowerCase())
228+
|| DYNAMIC_COLOR_SUPPORTED_BRANDS.contains(Build.BRAND.toLowerCase()));
225229
}
226230

227231
private static int getDefaultThemeOverlay(@NonNull Context context) {

0 commit comments

Comments
 (0)