diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2015-06-06 00:04:17 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-06 00:04:24 +0000 |
commit | 8f955f89c2ff19aac7f3e009c825beda3618f630 (patch) | |
tree | e4b4b401fd00c1f3902ef7031298f7808ec6a887 /core/java/android/os/BatteryStats.java | |
parent | 772ca6cf2a72f9cbf6e5dbe8693112638f3b5481 (diff) | |
parent | 5b1308f02d720808727af61863bd59c227d6fe02 (diff) | |
download | frameworks_base-8f955f89c2ff19aac7f3e009c825beda3618f630.zip frameworks_base-8f955f89c2ff19aac7f3e009c825beda3618f630.tar.gz frameworks_base-8f955f89c2ff19aac7f3e009c825beda3618f630.tar.bz2 |
Merge "Add UI for camera + flashlight battery reporting." into mnc-dev
Diffstat (limited to 'core/java/android/os/BatteryStats.java')
-rw-r--r-- | core/java/android/os/BatteryStats.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java index 0a45b8b..c9609e5 100644 --- a/core/java/android/os/BatteryStats.java +++ b/core/java/android/os/BatteryStats.java @@ -1940,6 +1940,15 @@ public abstract class BatteryStats implements Parcelable { */ public abstract long getFlashlightOnCount(int which); + /** + * Returns the time in microseconds that the camera has been on while the device was + * running on battery. + * + * {@hide} + */ + public abstract long getCameraOnTime(long elapsedRealtimeUs, int which); + + public static final int NETWORK_MOBILE_RX_DATA = 0; public static final int NETWORK_MOBILE_TX_DATA = 1; public static final int NETWORK_WIFI_RX_DATA = 2; @@ -2735,6 +2744,9 @@ public abstract class BatteryStats implements Parcelable { case OVERCOUNTED: label = "over"; break; + case CAMERA: + label = "camera"; + break; default: label = "???"; } @@ -3523,6 +3535,10 @@ public abstract class BatteryStats implements Parcelable { pw.print(prefix); pw.print(" Over-counted: "); printmAh(pw, bs.totalPowerMah); pw.println(); break; + case CAMERA: + pw.print(prefix); pw.print(" Camera: "); printmAh(pw, bs.totalPowerMah); + pw.println(); + break; } } pw.println(); |