Update battery charging status string

- Present status string only when status anomalous
 - Remove app usage pages divider

Bug: 185448191
Bug: 187767337
Bug: 187778673
Test: make SettingsRoboTests
Change-Id: I7829e9deed05fb7d95d483ddb718abfdc53b1aa6
This commit is contained in:
Wesley.CW Wang
2021-05-12 21:05:41 +08:00
parent e966debfd5
commit 2c6fd8fd3b
5 changed files with 21 additions and 10 deletions

View File

@@ -111,8 +111,9 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController
private CharSequence generateLabel(BatteryInfo info) {
if (BatteryUtils.isBatteryDefenderOn(info)) {
return null;
} else if (info.remainingLabel == null) {
// Present status independently if no remaining time
} else if (info.remainingLabel == null
|| info.batteryStatus == BatteryManager.BATTERY_STATUS_NOT_CHARGING) {
// Present status only if no remaining time or status anomalous
return info.statusLabel;
} else if (info.statusLabel != null && !info.discharging) {
// Charging state