Fix recording of wake_lock_in.
There was a bug that would allow the nesting count
to get off. Also better documentation of times in
HistoryItem, and new option to disable resetting of
the stats when unplugging.
Change-Id: If1b39a02475c5b620c67b700a323a6d0462d5c61
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index cf0caed..af45fa0 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -531,7 +531,8 @@
public final static class HistoryItem implements Parcelable {
public HistoryItem next;
-
+
+ // The time of this event in milliseconds, as per SystemClock.elapsedRealtime().
public long time;
public static final byte CMD_UPDATE = 0; // These can be written as deltas
@@ -645,7 +646,7 @@
public int eventCode;
public HistoryTag eventTag;
- // Only set for CMD_CURRENT_TIME.
+ // Only set for CMD_CURRENT_TIME or CMD_RESET, as per System.currentTimeMillis().
public long currentTime;
// Meta-data when reading.