Merge "Shorten main settings battery string" into oc-mr1-dev

This commit is contained in:
TreeHugger Robot
2017-08-01 19:45:59 +00:00
committed by Android (Google) Code Review
3 changed files with 7 additions and 7 deletions

View File

@@ -131,7 +131,7 @@ public class BatteryInfoTest {
}
@Test
public void testGetBatteryInfo_basedOnUsageTrue_usesUsageString() {
public void testGetBatteryInfo_basedOnUsageTrue_usesCorrectString() {
BatteryInfo info = BatteryInfo.getBatteryInfo(mContext, mDisChargingBatteryBroadcast,
mBatteryStats, SystemClock.elapsedRealtime() * 1000, false /* shortString */,
1000, true /* basedOnUsage */);
@@ -139,8 +139,10 @@ public class BatteryInfoTest {
mBatteryStats, SystemClock.elapsedRealtime() * 1000, true /* shortString */,
1000, true /* basedOnUsage */);
// We only add special mention for the long string
assertThat(info.remainingLabel.toString()).contains(ENHANCED_STRING_SUFFIX);
assertThat(info2.remainingLabel.toString()).contains(ENHANCED_STRING_SUFFIX);
// shortened string should not have extra text
assertThat(info2.remainingLabel.toString()).doesNotContain(ENHANCED_STRING_SUFFIX);
}
@Test