From a4cc205ee840a5374a96c9635dc5121d82a3eaf9 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 8 Jul 2013 17:31:25 -0700 Subject: 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 --- core/java/android/os/BatteryStats.java | 11 +++++++---- core/java/android/os/UserHandle.java | 10 ++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'core/java/android/os') 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 @@ public abstract class BatteryStats implements Parcelable { for (int i=0; i= Process.FIRST_ISOLATED_UID && appId <= Process.LAST_ISOLATED_UID) { sb.append('i'); sb.append(appId - Process.FIRST_ISOLATED_UID); - } else { + } else if (appId >= Process.FIRST_APPLICATION_UID) { sb.append('a'); + sb.append(appId - Process.FIRST_APPLICATION_UID); + } else { + sb.append('s'); sb.append(appId); } } @@ -190,8 +193,11 @@ public final class UserHandle implements Parcelable { if (appId >= Process.FIRST_ISOLATED_UID && appId <= Process.LAST_ISOLATED_UID) { pw.print('i'); pw.print(appId - Process.FIRST_ISOLATED_UID); - } else { + } else if (appId >= Process.FIRST_APPLICATION_UID) { pw.print('a'); + pw.print(appId - Process.FIRST_APPLICATION_UID); + } else { + pw.print('s'); pw.print(appId); } } -- cgit v1.1