From dfce5289974c8cf29bb4e97a972ccdff37175ec3 Mon Sep 17 00:00:00 2001 From: Dmitri Plotnikov Date: Thu, 14 Jan 2021 16:15:05 -0800 Subject: Convert MobileRadioPowerCalculator to work with BatteryUsageStats Test: atest FrameworksCoreTests:com.android.internal.os.MobileRadioPowerCalculatorTest Bug: 175644968 Change-Id: Iea088a14adde4255767ca76d8ec4c40b404cb33c --- core/java/android/os/BatteryConsumer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/java/android/os/BatteryConsumer.java') diff --git a/core/java/android/os/BatteryConsumer.java b/core/java/android/os/BatteryConsumer.java index ba29a15a91bb..fdc3d650d797 100644 --- a/core/java/android/os/BatteryConsumer.java +++ b/core/java/android/os/BatteryConsumer.java @@ -43,6 +43,7 @@ public abstract class BatteryConsumer { POWER_COMPONENT_AUDIO, POWER_COMPONENT_VIDEO, POWER_COMPONENT_FLASHLIGHT, + POWER_COMPONENT_MOBILE_RADIO, POWER_COMPONENT_SYSTEM_SERVICES, }) @Retention(RetentionPolicy.SOURCE) @@ -57,8 +58,9 @@ public abstract class BatteryConsumer { public static final int POWER_COMPONENT_VIDEO = 5; public static final int POWER_COMPONENT_FLASHLIGHT = 6; public static final int POWER_COMPONENT_SYSTEM_SERVICES = 7; + public static final int POWER_COMPONENT_MOBILE_RADIO = 8; - public static final int POWER_COMPONENT_COUNT = 8; + public static final int POWER_COMPONENT_COUNT = 9; public static final int FIRST_CUSTOM_POWER_COMPONENT_ID = 1000; public static final int LAST_CUSTOM_POWER_COMPONENT_ID = 9999; @@ -87,6 +89,7 @@ public abstract class BatteryConsumer { TIME_COMPONENT_BLUETOOTH, TIME_COMPONENT_CAMERA, TIME_COMPONENT_FLASHLIGHT, + TIME_COMPONENT_MOBILE_RADIO, }) @Retention(RetentionPolicy.SOURCE) public static @interface TimeComponent { @@ -100,8 +103,9 @@ public abstract class BatteryConsumer { public static final int TIME_COMPONENT_AUDIO = 5; public static final int TIME_COMPONENT_VIDEO = 6; public static final int TIME_COMPONENT_FLASHLIGHT = 7; + public static final int TIME_COMPONENT_MOBILE_RADIO = 8; - public static final int TIME_COMPONENT_COUNT = 8; + public static final int TIME_COMPONENT_COUNT = 9; public static final int FIRST_CUSTOM_TIME_COMPONENT_ID = 1000; public static final int LAST_CUSTOM_TIME_COMPONENT_ID = 9999; -- cgit v1.2.3