More procstats work.
The historical data is now a more central part of the stats.
When a checkin happens, the data is not deleted, just marked
as checked in so we can continue to access it.
The default procstats dump is now a new "summary" mode that
shows a more useful set of data for all of the running processes.
By default the current and all committed states are shown; you
use "--current" to only show the current. Use "--details" to
get the previous more detailed data (which now includes detailed
process data like the per-package data).
Also tweaked uid printing to be a little more compact.
Change-Id: I5414ea7c07134ebd5dc83f6f7b9f6e30151eda85
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index 8e0935d..12646bd 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -1803,8 +1803,8 @@
for (int i=0; i<timers.size(); i++) {
TimerEntry timer = timers.get(i);
sb.setLength(0);
- sb.append(" Wake lock #");
- sb.append(timer.mId);
+ sb.append(" Wake lock ");
+ UserHandle.formatUid(sb, timer.mId);
sb.append(" ");
sb.append(timer.mName);
printWakeLock(sb, timer.mTimer, batteryRealtime, null, which, ": ");
@@ -1822,8 +1822,11 @@
}
Uid u = uidStats.valueAt(iu);
-
- pw.println(prefix + " #" + uid + ":");
+
+ pw.print(prefix);
+ pw.print(" ");
+ UserHandle.formatUid(pw, uid);
+ pw.println(":");
boolean uidActivity = false;
long mobileRxBytes = u.getNetworkActivityCount(NETWORK_MOBILE_RX_BYTES, which);