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

Commit 9ba79d8b authored by mxyyiyi's avatar mxyyiyi
Browse files

[Expressive Battery] Migrate tips card in battery usage to banner message

- Update card preference: Update icon hint color by banner attention level
- Remove redundant color token: Use the existing Material yellow as a warning color

Bug: 349652542
Test: atest BatteryTipsControllerTest
Flag: com.android.settingslib.widget.theme.flags.is_expressive_design_enabled
Change-Id: I35730eb4716e9dbd712c22db63490e8bc06fc482
parent 5703095c
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@color/power_anomaly_app_warning_hint_color"/>
</selector>
+1 −1
Original line number Diff line number Diff line
@@ -20,6 +20,6 @@
    android:viewportWidth="960"
    android:viewportHeight="960">
    <path
        android:fillColor="@color/color_battery_anomaly_app_warning_selector"
        android:fillColor="@color/settingslib_colorBackgroundLevel_medium"
        android:pathData="M40,840L480,80L920,840L40,840ZM178,760L782,760L480,240L178,760ZM480,720Q497,720 508.5,708.5Q520,697 520,680Q520,663 508.5,651.5Q497,640 480,640Q463,640 451.5,651.5Q440,663 440,680Q440,697 451.5,708.5Q463,720 480,720ZM440,600L520,600L520,400L440,400L440,600ZM480,500L480,500L480,500L480,500Z"/>
</vector>
 No newline at end of file
+0 −3
Original line number Diff line number Diff line
@@ -55,9 +55,6 @@
    <!-- Icon tint color for battery usage system icon -->
    <color name="battery_usage_system_icon_color">@android:color/white</color>

    <!-- Power anomaly color for icons, button and text -->
    <color name="power_anomaly_app_warning_hint_color">#FDD663</color>

    <!-- UDFPS colors -->
    <color name="udfps_enroll_icon">#7DA7F1</color>
    <color name="udfps_moving_target_fill">#475670</color>
+0 −5
Original line number Diff line number Diff line
@@ -1459,11 +1459,6 @@
        <item>ic_battery_tips_warning_icon</item>
    </string-array>

    <string-array name="battery_tips_card_colors" translatable="false">
        <item>color_accent_selector</item>
        <item>color_battery_anomaly_app_warning_selector</item>
    </string-array>

    <!-- The following 4 arrays are for power anomaly tips card. Please keep them the same size. -->
    <string-array name="power_anomaly_title_ids" translatable="false">
        <item>battery_tips_settings_summary_brightness</item>
+0 −3
Original line number Diff line number Diff line
@@ -168,9 +168,6 @@
    <!-- Icon tint color for battery usage system icon -->
    <color name="battery_usage_system_icon_color">?android:attr/textColorPrimary</color>

    <!-- Power anomaly color for icons, button -->
    <color name="power_anomaly_app_warning_hint_color">#D56E0C</color>

    <!-- UDFPS colors -->
    <color name="udfps_enroll_icon">#699FF3</color>
    <color name="udfps_moving_target_fill">#C2D7F7</color>
Loading