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

Commit 353f12d9 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am f9be242a: am 3cd28adc: Merge "Fix issue #10427108: Google+ has long running...

am f9be242a: am 3cd28adc: Merge "Fix issue #10427108: Google+ has long running process" into klp-dev

* commit 'f9be242a':
  Fix issue #10427108: Google+ has long running process
parents ef00641c f9be242a
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -1583,7 +1583,7 @@ public final class ProcessStats implements Parcelable {
                final int NSRVS = pkgState.mServices.size();
                if (NPROCS > 0 || NSRVS > 0) {
                    if (!printedHeader) {
                        pw.println("Per-Package Process Stats:");
                        pw.println("Per-Package Stats:");
                        printedHeader = true;
                    }
                    pw.print("  * "); pw.print(pkgName); pw.print(" / ");
@@ -1651,7 +1651,8 @@ public final class ProcessStats implements Parcelable {
                        continue;
                    }
                    if (!printedHeader) {
                        pw.println("Process Stats:");
                        pw.println();
                        pw.println("Per-Process Stats:");
                        printedHeader = true;
                    }
                    pw.print("  * "); pw.print(procName); pw.print(" / ");
@@ -2536,7 +2537,8 @@ public final class ProcessStats implements Parcelable {
            if (mActive <= 0) {
                throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
            }
            int state = started ? memFactor : STATE_NOTHING;
            final boolean wasStarted = mStartedState != STATE_NOTHING;
            final int state = started ? memFactor : STATE_NOTHING;
            if (mStartedState != state) {
                if (mStartedState != STATE_NOTHING) {
                    addStateTime(SERVICE_STARTED + (mStartedState*SERVICE_COUNT),
@@ -2546,8 +2548,8 @@ public final class ProcessStats implements Parcelable {
                }
                mStartedState = state;
                mStartedStartTime = now;
                if (mProc != null) {
                mProc = mProc.pullFixedProc(mPackage);
                if (wasStarted != started) {
                    if (started) {
                        mProc.incStartedServices(memFactor, now);
                    } else {
@@ -2561,7 +2563,7 @@ public final class ProcessStats implements Parcelable {
            if (mActive <= 0) {
                throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
            }
            int state = bound ? memFactor : STATE_NOTHING;
            final int state = bound ? memFactor : STATE_NOTHING;
            if (mBoundState != state) {
                if (mBoundState != STATE_NOTHING) {
                    addStateTime(SERVICE_BOUND + (mBoundState*SERVICE_COUNT),
@@ -2578,7 +2580,7 @@ public final class ProcessStats implements Parcelable {
            if (mActive <= 0) {
                throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
            }
            int state = executing ? memFactor : STATE_NOTHING;
            final int state = executing ? memFactor : STATE_NOTHING;
            if (mExecState != state) {
                if (mExecState != STATE_NOTHING) {
                    addStateTime(SERVICE_EXEC + (mExecState*SERVICE_COUNT), now - mExecStartTime);
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import java.util.Comparator;
import java.util.StringTokenizer;

public class ProcessCpuTracker {
    private static final String TAG = "ProcessStats";
    private static final String TAG = "ProcessCpuTracker";
    private static final boolean DEBUG = false;
    private static final boolean localLOGV = DEBUG || false;

+3 −5
Original line number Diff line number Diff line
@@ -677,12 +677,10 @@ public final class ProcessStatsService extends IProcessStats.Stub {
                                if (checkedIn) pw.print(" (checked in)");
                                pw.println(":");
                                // Don't really need to lock because we uniquely own this object.
                                if (dumpDetails) {
                                    processStats.dumpLocked(pw, reqPackage, now, dumpAll);
                                } else {
                                // Always dump summary here, dumping all details is just too
                                // much crud.
                                processStats.dumpSummaryLocked(pw, reqPackage, now);
                            }
                            }
                            if (isCheckin) {
                                // Rename file suffix to mark that it has checked in.
                                file.getBaseFile().renameTo(new File(