am b0037316: Merge "More stuff I need for the proc stats UI." into klp-dev
* commit 'b0037316c4bbaf9d5b3ee8af563caf2539def564': More stuff I need for the proc stats UI.
This commit is contained in:
@@ -22,4 +22,5 @@ import com.android.internal.app.ProcessStats;
|
||||
|
||||
interface IProcessStats {
|
||||
byte[] getCurrentStats(out List<ParcelFileDescriptor> historic);
|
||||
int getCurrentMemoryState();
|
||||
}
|
||||
|
||||
@@ -1682,7 +1682,7 @@ public final class ProcessStats implements Parcelable {
|
||||
}
|
||||
}
|
||||
|
||||
static long dumpSingleServiceTime(PrintWriter pw, String prefix, ServiceState service,
|
||||
public static long dumpSingleServiceTime(PrintWriter pw, String prefix, ServiceState service,
|
||||
int serviceType, int curState, long curStartTime, long now) {
|
||||
long totalTime = 0;
|
||||
int printedScreen = -1;
|
||||
@@ -2403,15 +2403,15 @@ public final class ProcessStats implements Parcelable {
|
||||
|
||||
public static final class ServiceState {
|
||||
final ProcessStats mStats;
|
||||
final String mPackage;
|
||||
final String mName;
|
||||
public final String mPackage;
|
||||
public final String mName;
|
||||
ProcessState mProc;
|
||||
|
||||
int mActive = 1;
|
||||
|
||||
static final int SERVICE_STARTED = 0;
|
||||
static final int SERVICE_BOUND = 1;
|
||||
static final int SERVICE_EXEC = 2;
|
||||
public static final int SERVICE_STARTED = 0;
|
||||
public static final int SERVICE_BOUND = 1;
|
||||
public static final int SERVICE_EXEC = 2;
|
||||
static final int SERVICE_COUNT = 3;
|
||||
|
||||
int[] mDurationsTable;
|
||||
|
||||
@@ -435,6 +435,12 @@ public final class ProcessStatsService extends IProcessStats.Stub {
|
||||
return current.marshall();
|
||||
}
|
||||
|
||||
public int getCurrentMemoryState() {
|
||||
synchronized (mAm) {
|
||||
return mLastMemOnlyState;
|
||||
}
|
||||
}
|
||||
|
||||
static private void dumpHelp(PrintWriter pw) {
|
||||
pw.println("Process stats (procstats) dump options:");
|
||||
pw.println(" [--checkin|-c|--csv] [--csv-screen] [--csv-proc] [--csv-mem]");
|
||||
|
||||
Reference in New Issue
Block a user