Merge "Update Settings charging string" into tm-qpr-dev am: 4909c7923b

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19568529

Change-Id: I7a115aed0ce30980579c8b2afb6335182d78d3e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Wesley Wang
2022-08-22 02:44:03 +00:00
committed by Automerger Merge Worker
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.