Loading core/res/res/values/config.xml +9 −0 Original line number Diff line number Diff line Loading @@ -2643,6 +2643,15 @@ <!-- MMS user agent prolfile url --> <string name="config_mms_user_agent_profile_url" translatable="false"></string> <!-- The default list of possible CMF Names|Style|ColorSource. This array can be overridden device-specific resources. A wildcard (fallback) must be supplied. Name - Read from `ro.boot.hardware.color` sysprop. Fallback (*) required. Styles - frameworks/libs/systemui/monet/src/com/android/systemui/monet/Style.java Color - `home_wallpaper` (for color extraction) or a hexadecimal int (#FFcc99) --> <string-array name="theming_defaults"> <item>*|TONAL_SPOT|home_wallpaper</item> </string-array> <!-- National Language Identifier codes for the following two config items. (from 3GPP TS 23.038 V9.1.1 Table 6.2.1.2.4.1): 0 - reserved Loading core/res/res/values/symbols.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5903,6 +5903,9 @@ <java-symbol type="drawable" name="ic_notification_summarization" /> <java-symbol type="dimen" name="notification_collapsed_height_with_summarization" /> <!-- Device CMF Theming Settings --> <java-symbol type="array" name="theming_defaults" /> <!-- Advanced Protection Service USB feature --> <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_notification_title" /> <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_notification_text" /> Loading packages/SystemUI/aconfig/systemui.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -1976,6 +1976,16 @@ flag { } } flag { name: "hardware_color_styles" namespace: "systemui" description: "Enables loading initial colors based ion hardware color" bug: "347286986" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "shade_launch_accessibility" namespace: "systemui" Loading packages/SystemUI/multivalentTests/src/com/android/systemui/theme/HardwareColorRule.java 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.theme; import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; public class HardwareColorRule implements TestRule { public String color = ""; public String[] options = {}; public boolean isTesting = false; @Override public Statement apply(Statement base, Description description) { HardwareColors hardwareColors = description.getAnnotation(HardwareColors.class); if (hardwareColors != null) { color = hardwareColors.color(); options = hardwareColors.options(); isTesting = true; } return base; } } packages/SystemUI/multivalentTests/src/com/android/systemui/theme/HardwareColors.java 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.theme; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface HardwareColors { String color(); String[] options(); } Loading
core/res/res/values/config.xml +9 −0 Original line number Diff line number Diff line Loading @@ -2643,6 +2643,15 @@ <!-- MMS user agent prolfile url --> <string name="config_mms_user_agent_profile_url" translatable="false"></string> <!-- The default list of possible CMF Names|Style|ColorSource. This array can be overridden device-specific resources. A wildcard (fallback) must be supplied. Name - Read from `ro.boot.hardware.color` sysprop. Fallback (*) required. Styles - frameworks/libs/systemui/monet/src/com/android/systemui/monet/Style.java Color - `home_wallpaper` (for color extraction) or a hexadecimal int (#FFcc99) --> <string-array name="theming_defaults"> <item>*|TONAL_SPOT|home_wallpaper</item> </string-array> <!-- National Language Identifier codes for the following two config items. (from 3GPP TS 23.038 V9.1.1 Table 6.2.1.2.4.1): 0 - reserved Loading
core/res/res/values/symbols.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5903,6 +5903,9 @@ <java-symbol type="drawable" name="ic_notification_summarization" /> <java-symbol type="dimen" name="notification_collapsed_height_with_summarization" /> <!-- Device CMF Theming Settings --> <java-symbol type="array" name="theming_defaults" /> <!-- Advanced Protection Service USB feature --> <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_notification_title" /> <java-symbol type="string" name="usb_apm_usb_plugged_in_when_locked_notification_text" /> Loading
packages/SystemUI/aconfig/systemui.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -1976,6 +1976,16 @@ flag { } } flag { name: "hardware_color_styles" namespace: "systemui" description: "Enables loading initial colors based ion hardware color" bug: "347286986" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "shade_launch_accessibility" namespace: "systemui" Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/theme/HardwareColorRule.java 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.theme; import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; public class HardwareColorRule implements TestRule { public String color = ""; public String[] options = {}; public boolean isTesting = false; @Override public Statement apply(Statement base, Description description) { HardwareColors hardwareColors = description.getAnnotation(HardwareColors.class); if (hardwareColors != null) { color = hardwareColors.color(); options = hardwareColors.options(); isTesting = true; } return base; } }
packages/SystemUI/multivalentTests/src/com/android/systemui/theme/HardwareColors.java 0 → 100644 +30 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.theme; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface HardwareColors { String color(); String[] options(); }