summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2021-01-12 07:02:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-01-12 07:02:14 +0000
commitadb7d3e4c21200d32230a681f15c61aa38b64145 (patch)
tree798dea9919ad2afdc2e7da0da09a9cead11da0b2 /core/java/android
parentd52221bc4777d768acbb2ee9254bc5146d2d3112 (diff)
parent3ac6cdc2f8036645d9b0ee898c18234ed55d0d32 (diff)
Merge "Convert several PowerCalculators to use BatteryUsageStats"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/os/BatteryConsumer.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/core/java/android/os/BatteryConsumer.java b/core/java/android/os/BatteryConsumer.java
index bf8ac6e55d8a..ba29a15a91bb 100644
--- a/core/java/android/os/BatteryConsumer.java
+++ b/core/java/android/os/BatteryConsumer.java
@@ -39,6 +39,11 @@ public abstract class BatteryConsumer {
POWER_COMPONENT_USAGE,
POWER_COMPONENT_CPU,
POWER_COMPONENT_BLUETOOTH,
+ POWER_COMPONENT_CAMERA,
+ POWER_COMPONENT_AUDIO,
+ POWER_COMPONENT_VIDEO,
+ POWER_COMPONENT_FLASHLIGHT,
+ POWER_COMPONENT_SYSTEM_SERVICES,
})
@Retention(RetentionPolicy.SOURCE)
public static @interface PowerComponent {
@@ -47,8 +52,13 @@ public abstract class BatteryConsumer {
public static final int POWER_COMPONENT_USAGE = 0;
public static final int POWER_COMPONENT_CPU = 1;
public static final int POWER_COMPONENT_BLUETOOTH = 2;
+ public static final int POWER_COMPONENT_CAMERA = 3;
+ public static final int POWER_COMPONENT_AUDIO = 4;
+ 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_COUNT = 3;
+ public static final int POWER_COMPONENT_COUNT = 8;
public static final int FIRST_CUSTOM_POWER_COMPONENT_ID = 1000;
public static final int LAST_CUSTOM_POWER_COMPONENT_ID = 9999;
@@ -75,6 +85,8 @@ public abstract class BatteryConsumer {
TIME_COMPONENT_CPU,
TIME_COMPONENT_CPU_FOREGROUND,
TIME_COMPONENT_BLUETOOTH,
+ TIME_COMPONENT_CAMERA,
+ TIME_COMPONENT_FLASHLIGHT,
})
@Retention(RetentionPolicy.SOURCE)
public static @interface TimeComponent {
@@ -84,8 +96,12 @@ public abstract class BatteryConsumer {
public static final int TIME_COMPONENT_CPU = 1;
public static final int TIME_COMPONENT_CPU_FOREGROUND = 2;
public static final int TIME_COMPONENT_BLUETOOTH = 3;
+ public static final int TIME_COMPONENT_CAMERA = 4;
+ 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_COUNT = 4;
+ public static final int TIME_COMPONENT_COUNT = 8;
public static final int FIRST_CUSTOM_TIME_COMPONENT_ID = 1000;
public static final int LAST_CUSTOM_TIME_COMPONENT_ID = 9999;