Refine battery text in battery header
1. When there exists estimate time, show it, otherwise show battery status label. 2. Change the summary based on whether it is charging. (Estimated time left vs Time to full charge) Bug: 35328749 Test: RunSettingsRoboTests Change-Id: I64ee8acd248062b4effcfc58ed908be7d89621a3
This commit is contained in:
@@ -60,7 +60,9 @@ public class BatteryHistoryPreference extends Preference {
|
||||
view.itemView.setClickable(true);
|
||||
view.setDividerAllowedAbove(true);
|
||||
((TextView) view.findViewById(R.id.charge)).setText(mBatteryInfo.batteryPercentString);
|
||||
((TextView) view.findViewById(R.id.estimation)).setText(mBatteryInfo.remainingLabel);
|
||||
((TextView) view.findViewById(R.id.estimation)).setText(
|
||||
mBatteryInfo.remainingLabel != null ?
|
||||
mBatteryInfo.remainingLabel : mBatteryInfo.statusLabel);
|
||||
UsageView usageView = (UsageView) view.findViewById(R.id.battery_usage);
|
||||
usageView.findViewById(R.id.label_group).setAlpha(.7f);
|
||||
mBatteryInfo.bindHistory(usageView);
|
||||
|
Reference in New Issue
Block a user