Merge "Remove legacy MIN_POWER_THRESHOLD_MILLI_AMP_HOURS threshold value" into sc-dev am: a0d61f253a am: 814dd75918

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

Change-Id: I347894b649bd47134b6e211765e1e1e71583b2a2
This commit is contained in:
YUKAI HUNG
2021-06-21 11:13:46 +00:00
committed by Automerger Merge Worker
3 changed files with 4 additions and 30 deletions

View File

@@ -246,17 +246,7 @@ public class BatteryUtilsTest {
}
@Test
public void testShouldHideSystemConsumer_LowPower_ReturnTrue() {
when(mAggregateBatteryConsumer.getConsumedPower(
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)).thenReturn(0.0005);
assertThat(mBatteryUtils.shouldHideDevicePowerComponent(mAggregateBatteryConsumer,
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)).isTrue();
}
@Test
public void testShouldHideSystemConsumer_HighPower_ReturnFalse() {
when(mAggregateBatteryConsumer.getConsumedPower(
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)).thenReturn(0.5);
public void testShouldHideSystemConsumer_OtherType_ReturnFalse() {
assertThat(mBatteryUtils.shouldHideDevicePowerComponent(mAggregateBatteryConsumer,
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)).isFalse();
}