Add estimated time remaining text to QS
- Add an API to BatteryController to get an estimated time remaining string. - BatteryController will now check up to once per minute what the estimated time will be and builds the string using PowerUtil. - If the "show percentage" setting is on, the estimated time remaining string (and battery icon) will show next to the system icons in QS - Also make the battery percent in QS obey the setting Test: visual Bug: 116481529 Change-Id: Iaafa00127c8b8baae40956254a1237c8b7ac079b
This commit is contained in:
@@ -42,6 +42,20 @@
|
||||
android:id="@+id/statusIcons"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="1"
|
||||
android:paddingEnd="@dimen/signal_cluster_battery_padding" />
|
||||
|
||||
<com.android.systemui.BatteryMeterView
|
||||
android:id="@+id/batteryRemainingIcon"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingEnd="2dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/batteryRemainingText"
|
||||
android:textAppearance="@style/TextAppearance.QS.TileLabel"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user