diff options
| author | Dmitri Plotnikov <dplotnikov@google.com> | 2021-01-14 16:15:05 -0800 |
|---|---|---|
| committer | Dmitri Plotnikov <dplotnikov@google.com> | 2021-01-21 13:19:21 -0800 |
| commit | dfce5289974c8cf29bb4e97a972ccdff37175ec3 (patch) | |
| tree | 90b85da5ac46f8313cb64fdc99687e9d2f52537f /core/java/android | |
| parent | 57d27a25f7635c6bc68159423d76378f91e10f15 (diff) | |
Convert MobileRadioPowerCalculator to work with BatteryUsageStats
Test: atest FrameworksCoreTests:com.android.internal.os.MobileRadioPowerCalculatorTest
Bug: 175644968
Change-Id: Iea088a14adde4255767ca76d8ec4c40b404cb33c
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/os/BatteryConsumer.java | 8 | ||||
| -rw-r--r-- | core/java/android/os/SystemBatteryConsumer.java | 4 |
2 files changed, 8 insertions, 4 deletions
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; diff --git a/core/java/android/os/SystemBatteryConsumer.java b/core/java/android/os/SystemBatteryConsumer.java index 08e358f9094e..49bf08461016 100644 --- a/core/java/android/os/SystemBatteryConsumer.java +++ b/core/java/android/os/SystemBatteryConsumer.java @@ -41,7 +41,7 @@ public class SystemBatteryConsumer extends BatteryConsumer implements Parcelable // Reserved: APP DRAIN_TYPE_BLUETOOTH, DRAIN_TYPE_CAMERA, - DRAIN_TYPE_CELL, + DRAIN_TYPE_MOBILE_RADIO, DRAIN_TYPE_FLASHLIGHT, DRAIN_TYPE_IDLE, DRAIN_TYPE_MEMORY, @@ -59,7 +59,7 @@ public class SystemBatteryConsumer extends BatteryConsumer implements Parcelable public static final int DRAIN_TYPE_AMBIENT_DISPLAY = 0; public static final int DRAIN_TYPE_BLUETOOTH = 2; public static final int DRAIN_TYPE_CAMERA = 3; - public static final int DRAIN_TYPE_CELL = 4; + public static final int DRAIN_TYPE_MOBILE_RADIO = 4; public static final int DRAIN_TYPE_FLASHLIGHT = 5; public static final int DRAIN_TYPE_IDLE = 6; public static final int DRAIN_TYPE_MEMORY = 7; |
