Merge "Atom: ScheduledJobStateChanged"

This commit is contained in:
TreeHugger Robot
2018-01-22 21:19:23 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 2 deletions

View File

@@ -327,8 +327,9 @@ message ScheduledJobStateChanged {
optional string name = 2;
enum State {
OFF = 0;
ON = 1;
FINISHED = 0;
STARTED = 1;
SCHEDULED = 2;
}
optional State state = 3;

View File

@@ -63,6 +63,7 @@ import android.util.KeyValueListParser;
import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.util.StatsLog;
import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
@@ -823,6 +824,8 @@ public final class JobSchedulerService extends com.android.server.SystemService
jobStatus.enqueueWorkLocked(ActivityManager.getService(), work);
}
startTrackingJobLocked(jobStatus, toCancel);
StatsLog.write_non_chained(StatsLog.SCHEDULED_JOB_STATE_CHANGED,
uId, null, jobStatus.getBatteryName(), 2);
// If the job is immediately ready to run, then we can just immediately
// put it in the pending list and try to schedule it. This is especially