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

Commit 90381205 authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Skip STATE_SERVICE_RESTARTING while dumping procstats to statsd" into sc-dev

parents 3afe697d ec65308e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ public final class DumpUtils {
        STATE_LABELS[STATE_BOUND_TOP_OR_FGS]        = "Bnd TopFgs";
        STATE_LABELS[STATE_FGS]                     = "       Fgs";
        STATE_LABELS[STATE_IMPORTANT_FOREGROUND]    = "    Imp Fg";
        STATE_LABELS[STATE_IMPORTANT_FOREGROUND]    = "    Imp Fg";
        STATE_LABELS[STATE_IMPORTANT_BACKGROUND]    = "    Imp Bg";
        STATE_LABELS[STATE_BACKUP]                  = "    Backup";
        STATE_LABELS[STATE_SERVICE]                 = "   Service";
+7 −1
Original line number Diff line number Diff line
@@ -1550,6 +1550,10 @@ public final class ProcessState {
            final int key = mDurations.getKeyAt(i);
            final int type = SparseMappingTable.getIdFromKey(key);
            final int aggregatedType = DumpUtils.aggregateCurrentProcessState(type);
            if ((type % STATE_COUNT) == STATE_SERVICE_RESTARTING) {
                // Skip restarting service state -- that is not actually a running process.
                continue;
            }

            long time = mDurations.getValue(key);
            if (mCurCombinedState == type) {
@@ -1563,7 +1567,9 @@ public final class ProcessState {
                durationByState.put(aggregatedType, time);
            }
        }
        if (!didCurState && mCurCombinedState != STATE_NOTHING) {
        if (!didCurState && mCurCombinedState != STATE_NOTHING
                && (mCurCombinedState % STATE_COUNT) != STATE_SERVICE_RESTARTING) {
            // Skip restarting service state -- that is not actually a running process.
            final int aggregatedType = DumpUtils.aggregateCurrentProcessState(mCurCombinedState);
            int index = durationByState.indexOfKey(aggregatedType);
            if (index >= 0) {