Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c536f8d6 authored by Marcelo Arteiro's avatar Marcelo Arteiro
Browse files

Fixes theming setting to add only necessary properties

`android.theme.customization.system_palette` is being set with both
`system_palette` and `accent_color`. But these properties are only
necessary when `color_source` is set to `preset`. Fixed with this
change.

Bug: 404539643
Test: Manual
Flag: com.android.systemui.hardware_color_styles
Change-Id: I3d9014a57b94a20191300668ef38db7da32882bb
parent 0709b098
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -537,8 +537,10 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
            try {
                JSONObject object = new JSONObject(overlayPackageJson);
                String seedColorStr = Integer.toHexString(defaultSettings.seedColor.toArgb());
                if(defaultSettings.colorSource == COLOR_SOURCE_PRESET){
                    object.put(OVERLAY_CATEGORY_SYSTEM_PALETTE, seedColorStr);
                    object.put(OVERLAY_CATEGORY_ACCENT_COLOR, seedColorStr);
                }
                object.put(OVERLAY_COLOR_SOURCE, defaultSettings.colorSource);
                object.put(OVERLAY_CATEGORY_THEME_STYLE, Style.toString(mThemeStyle));