[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
This commit is contained in:
mxyyiyi
2025-02-18 14:00:55 +08:00
parent 5703095c5c
commit 9ba79d8b02
10 changed files with 134 additions and 111 deletions

View File

@@ -377,7 +377,9 @@ public class BatteryChartView extends AppCompatImageView implements View.OnClick
mTransomTop = resources.getDimensionPixelSize(R.dimen.chartview_transom_padding_top);
mTransomLineDefaultColor = Utils.getDisabled(mContext, DIVIDER_COLOR);
mTransomLineSelectedColor =
resources.getColor(R.color.color_battery_anomaly_app_warning_selector);
resources.getColor(
com.android.settingslib.widget.preference.banner.R.color
.settingslib_banner_button_background_medium);
final int slotHighlightColor = Utils.getDisabled(mContext, mTransomLineSelectedColor);
mTransomIconSize = resources.getDimensionPixelSize(R.dimen.chartview_transom_icon_size);
mTransomLinePaint = new Paint();