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

Commit 24fdd1fc authored by Simon MacMullen's avatar Simon MacMullen Committed by Android (Google) Code Review
Browse files

Merge "Trace job execution." into tm-qpr-dev

parents 556ecc8d 6c0d3e10
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.Trace;
import android.os.UserHandle;
import android.util.EventLog;
import android.util.IndentingPrintWriter;
@@ -361,6 +362,9 @@ public final class JobServiceContext implements ServiceConnection {
                    job.getJob().getPriority(),
                    job.getEffectivePriority(),
                    job.getNumFailures());
            // Use the context's ID to distinguish traces since there'll only be one job running
            // per context.
            Trace.asyncTraceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, job.getTag(), getId());
            try {
                mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid());
            } catch (RemoteException e) {
@@ -1024,6 +1028,7 @@ public final class JobServiceContext implements ServiceConnection {
                completedJob.getJob().getPriority(),
                completedJob.getEffectivePriority(),
                completedJob.getNumFailures());
        Trace.asyncTraceEnd(Trace.TRACE_TAG_SYSTEM_SERVER, completedJob.getTag(), getId());
        try {
            mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(), mRunningJob.getSourceUid(),
                    internalStopReason);
+1 −1
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ public final class JobStatus {
        this.batteryName = this.sourceTag != null
                ? this.sourceTag + ":" + job.getService().getPackageName()
                : job.getService().flattenToShortString();
        this.tag = "*job*/" + this.batteryName;
        this.tag = "*job*/" + this.batteryName + "#" + job.getId();

        this.earliestRunTimeElapsedMillis = earliestRunTimeElapsedMillis;
        this.latestRunTimeElapsedMillis = latestRunTimeElapsedMillis;