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

@@ -167,6 +167,17 @@ public class BatteryHeaderPreferenceControllerTest {
verify(mBatteryUsageProgressBarPref).setBottomSummary(BATTERY_STATUS);
}
@Test
public void updatePreference_statusAnomalous_showStatusLabel() {
mBatteryInfo.remainingLabel = TIME_LEFT;
mBatteryInfo.statusLabel = BATTERY_STATUS;
mBatteryInfo.batteryStatus = BatteryManager.BATTERY_STATUS_NOT_CHARGING;
mController.updateHeaderPreference(mBatteryInfo);
verify(mBatteryUsageProgressBarPref).setBottomSummary(BATTERY_STATUS);
}
@Test
public void updatePreference_charging_showFullText() {
setChargingState(/* isDischarging */ false, /* updatedByStatusFeature */ false);