Merge "Update strings when shortString is true" into oc-mr1-dev

am: d0066e3875

Change-Id: Ifce24bf0b5df7b912d3859d6aacdb35a90ce9c29
This commit is contained in:
jackqdyulei
2017-08-23 20:01:51 +00:00
committed by android-build-merger
2 changed files with 5 additions and 3 deletions

View File

@@ -123,11 +123,14 @@ public class BatteryInfoTest {
}
@Test
public void testGetBatteryInfo_pluggedIn_dischargingFalse() {
public void testGetBatteryInfo_pluggedInUsingShortString_usesCorrectData() {
doReturn(TEST_CHARGE_TIME_REMAINING).when(mBatteryStats).computeChargeTimeRemaining(
anyLong());
BatteryInfo info = BatteryInfo.getBatteryInfoOld(mContext, mChargingBatteryBroadcast,
mBatteryStats, SystemClock.elapsedRealtime() * 1000, true /* shortString */);
assertThat(info.discharging).isEqualTo(false);
assertThat(info.chargeLabel.toString()).isEqualTo("50% - 1m until fully charged");
}
@Test