Remove legacy MIN_POWER_THRESHOLD_MILLI_AMP_HOURS threshold value
in the new design, we should store all data into the databae for showing the battery history, we should not filter the items first from the consumed battery value threshold Bug: 191468827 Test: make SettingsRoboTests Change-Id: I19d971fc5cdcc40af1693dc8ba2c78586da22d49
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user