Merge "Remove references to POWER_COMPONENT_USAGE and TIME_COMPONENT_USAGE" into sc-dev am: 3ac49f0a9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14078240 Change-Id: Ida4310282710b182529e038724a825e5dfd102de
This commit is contained in:
@@ -28,7 +28,6 @@ import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.os.BatteryConsumer;
|
||||
import android.os.Handler;
|
||||
import android.os.Process;
|
||||
import android.os.SystemBatteryConsumer;
|
||||
@@ -178,8 +177,7 @@ public class BatteryEntryTest {
|
||||
final BatteryEntry entry = new BatteryEntry(RuntimeEnvironment.application, mockHandler,
|
||||
mockUserManager, mSystemBatteryConsumer, false, null, null);
|
||||
|
||||
when(mSystemBatteryConsumer.getUsageDurationMillis(BatteryConsumer.TIME_COMPONENT_USAGE))
|
||||
.thenReturn(100L);
|
||||
when(mSystemBatteryConsumer.getUsageDurationMillis()).thenReturn(100L);
|
||||
|
||||
assertThat(entry.getTimeInForegroundMs()).isEqualTo(100L);
|
||||
}
|
||||
@@ -200,7 +198,7 @@ public class BatteryEntryTest {
|
||||
final BatteryEntry entry = new BatteryEntry(RuntimeEnvironment.application, mockHandler,
|
||||
mockUserManager, mSystemBatteryConsumer, false, null, null);
|
||||
|
||||
when(mSystemBatteryConsumer.getUsageDurationMillis(BatteryConsumer.TIME_COMPONENT_USAGE))
|
||||
when(mSystemBatteryConsumer.getUsageDurationMillis())
|
||||
.thenReturn(100L);
|
||||
|
||||
assertThat(entry.getTimeInBackgroundMs()).isEqualTo(0);
|
||||
|
||||
Reference in New Issue
Block a user