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

Commit d5747a6d authored by Tej Singh's avatar Tej Singh
Browse files

Atom: ScheduledJobStateChanged

Rename the possible states in ScheduleJobStateChanged
from ON and OFF to SCHEDULED, STARTED, and FINISHED.
Added the log line in JobSchedulerService for SCHEDULE.
STARTED corresponds to what previously was the ON event.
FINISHED corresponds to what previously was the OFF event.

Test: accompanying CTS test
Change-Id: I779dd58092e8fdee58561b8e8e74be5404f3ed93
parent 6ca845ae
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -322,8 +322,9 @@ message ScheduledJobStateChanged {
    optional string name = 2;

    enum State {
        OFF = 0;
        ON = 1;
        FINISHED = 0;
        STARTED = 1;
        SCHEDULED = 2;
    }
    optional State state = 3;

+3 −0
Original line number Diff line number Diff line
@@ -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