From ab07b53ea140b6386702145f65775166b2d369d6 Mon Sep 17 00:00:00 2001 From: ykhung Date: Tue, 18 Apr 2023 18:05:08 +0800 Subject: [PATCH] Fix banner tip buttons visibility and update incompatible tip Fix the battery settings banner tip buttons visibility not reset issue and update the incompatible charging tip into the colored primary button Bug: 246960554 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.* Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.widget.CardPreferenceTest Change-Id: I9b72fccc7838d974d3b60d0f9684780841623cbb --- res/layout/card_preference.xml | 11 ++-- .../fuelgauge/batterytip/tips/BatteryTip.java | 4 ++ .../tips/IncompatibleChargerTip.java | 8 +-- .../settings/widget/CardPreference.java | 19 +++++-- .../batterytip/tips/BatteryTipTest.java | 18 +++++++ .../tips/IncompatibleChargerTipTest.java | 4 +- .../settings/widget/CardPreferenceTest.java | 53 +++++++++++-------- 7 files changed, 81 insertions(+), 36 deletions(-) diff --git a/res/layout/card_preference.xml b/res/layout/card_preference.xml index e02933560d2..83c6eaf6a7c 100644 --- a/res/layout/card_preference.xml +++ b/res/layout/card_preference.xml @@ -67,12 +67,15 @@ android:maxLines="10" style="@style/PreferenceSummaryTextStyle"/> -