Update Settings charging string

- Update charging protected string

Bug: 236798712
Test: make and verify strings
Change-Id: I86e063191b42e98d8836a6dbe3b32ff3ce3bb8d0
This commit is contained in:
Wesley Wang
2022-08-09 20:23:33 +08:00
committed by wesleycwwang
parent aa3262857c
commit 4dd92bf5a1
2 changed files with 5 additions and 3 deletions

View File

@@ -249,6 +249,8 @@ public class BatteryInfoTest {
@Test
public void testGetBatteryInfo_chargingWithOverheated_updateChargeLabel() {
final String expectedString =
mContext.getString(R.string.battery_tip_limited_temporarily_title);
doReturn(TEST_CHARGE_TIME_REMAINING)
.when(mBatteryUsageStats)
.getChargeTimeRemainingMs();
@@ -260,7 +262,7 @@ public class BatteryInfoTest {
false /* shortString */);
assertThat(info.isOverheated).isTrue();
assertThat(info.chargeLabel).isEqualTo("50% - Charging temporarily limited");
assertThat(info.chargeLabel.toString()).contains(expectedString);
}
// Make our battery stats return a sequence of battery events.