Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69cb00b8 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

More stuff I need for the proc stats UI.

Change-Id: I5f05b79bc4d5766a80f2db9d20ba8078b60c1b00
parent dd78a0fb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,4 +22,5 @@ import com.android.internal.app.ProcessStats;

interface IProcessStats {
    byte[] getCurrentStats(out List<ParcelFileDescriptor> historic);
    int getCurrentMemoryState();
}
+6 −6
Original line number Diff line number Diff line
@@ -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;
+6 −0
Original line number Diff line number Diff line
@@ -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]");