summaryrefslogtreecommitdiffstats
path: root/core/java/android/os/BatteryStats.java
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2015-06-06 00:04:17 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-06 00:04:24 +0000
commit8f955f89c2ff19aac7f3e009c825beda3618f630 (patch)
treee4b4b401fd00c1f3902ef7031298f7808ec6a887 /core/java/android/os/BatteryStats.java
parent772ca6cf2a72f9cbf6e5dbe8693112638f3b5481 (diff)
parent5b1308f02d720808727af61863bd59c227d6fe02 (diff)
downloadframeworks_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.java16
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();