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

Commit c26379f2 authored by Marcelo Arteiro's avatar Marcelo Arteiro Committed by Android (Google) Code Review
Browse files

Merge "Add new default CMF Styles array in config.xml" into main

parents 2acac35d ec69a7e5
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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
+3 −0
Original line number Diff line number Diff line
@@ -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" />
+10 −0
Original line number Diff line number Diff line
@@ -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"
+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;
    }
}
+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