Merge "Update the chargeLabel when battery level is full" into oc-dr1-dev am: 1eb2f15339
am: e9d1f6f1ae
Change-Id: I1b6ae16aa8899561e240c09eaaa2c89083a70b4a
This commit is contained in:
@@ -164,4 +164,15 @@ public class BatteryInfoTest {
|
||||
assertThat(info.remainingLabel.toString())
|
||||
.isEqualTo(TEST_CHARGE_TIME_REMAINING_STRINGIFIED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetBatteryInfo_pluggedInWithFullBattery_onlyShowBatteryLevel() {
|
||||
mChargingBatteryBroadcast.putExtra(BatteryManager.EXTRA_LEVEL, 100);
|
||||
|
||||
BatteryInfo info = BatteryInfo.getBatteryInfo(mContext, mChargingBatteryBroadcast,
|
||||
mBatteryStats, SystemClock.elapsedRealtime() * 1000, false /* shortString */,
|
||||
1000, false /* basedOnUsage */);
|
||||
|
||||
assertThat(info.chargeLabel).isEqualTo("100%");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user