Port battery usage bug fixing cls from master to tm-qpr-dev

This cl is a merge of the following 5 cls:
ag/19674112	Fix b/242989581: The two battery charts have the same label
ag/19667114	Support data logging for battery usage new chart view
ag/19636171	Support data logging for battery usage new chart view
ag/19682758	Resolve insufficient contrast for system component icons
ag/19697763	Add fade in animation for battery usage chart group

Bug: 242989581
Bug: 242810430
Bug: 242989982
Test: presubmit
Change-Id: I39cd0f88ce62a280a966750082a40f8a537b9616
Merged-In: Ice30508bc20b5de631efee0db0160fe6ad710dbb
This commit is contained in:
Zaiyue Xue
2022-08-19 14:29:00 +08:00
parent bf23a06eac
commit 2a57f5de8d
18 changed files with 186 additions and 62 deletions

View File

@@ -31,25 +31,33 @@
android:textColor="?android:attr/textColorSecondary"
android:text="@string/battery_usage_chart_graph_hint_last_full_charge" />
<com.android.settings.fuelgauge.batteryusage.BatteryChartView
android:id="@+id/daily_battery_chart"
<LinearLayout
android:id="@+id/battery_chart_group"
android:layout_width="match_parent"
android:layout_height="170dp"
android:layout_marginBottom="16dp"
android:visibility="gone"
android:contentDescription="@string/battery_usage_chart"
android:textAppearance="?android:attr/textAppearanceSmall"
settings:textColor="?android:attr/textColorSecondary" />
android:layout_height="wrap_content"
android:orientation="vertical"
android:alpha="0">
<com.android.settings.fuelgauge.batteryusage.BatteryChartView
android:id="@+id/daily_battery_chart"
android:layout_width="match_parent"
android:layout_height="170dp"
android:layout_marginBottom="16dp"
android:visibility="gone"
android:contentDescription="@string/daily_battery_usage_chart"
android:textAppearance="?android:attr/textAppearanceSmall"
settings:textColor="?android:attr/textColorSecondary" />
<com.android.settings.fuelgauge.batteryusage.BatteryChartView
android:id="@+id/hourly_battery_chart"
android:layout_width="match_parent"
android:layout_height="170dp"
android:layout_marginBottom="16dp"
android:visibility="visible"
android:contentDescription="@string/hourly_battery_usage_chart"
android:textAppearance="?android:attr/textAppearanceSmall"
settings:textColor="?android:attr/textColorSecondary" />
</LinearLayout>
<com.android.settings.fuelgauge.batteryusage.BatteryChartView
android:id="@+id/hourly_battery_chart"
android:layout_width="match_parent"
android:layout_height="170dp"
android:layout_marginBottom="16dp"
android:visibility="visible"
android:contentDescription="@string/battery_usage_chart"
android:textAppearance="?android:attr/textAppearanceSmall"
settings:textColor="?android:attr/textColorSecondary" />
<!-- Use non-scalable text size from text_size_small_material -->
<TextView
android:id="@+id/companion_text"