public class ContentObserverController extends StateController
mContext, mLock, mStateChangedListener
Modifier and Type | Method and Description |
---|---|
void |
dumpControllerStateLocked(PrintWriter pw,
int filterUid) |
static ContentObserverController |
get(JobSchedulerService taskManagerService) |
static ContentObserverController |
getForTesting(StateChangedListener stateChangedListener,
Context context) |
void |
maybeStartTrackingJobLocked(JobStatus taskStatus,
JobStatus lastJob)
Implement the logic here to decide whether a job should be tracked by this controller.
|
void |
maybeStopTrackingJobLocked(JobStatus taskStatus,
JobStatus incomingJob,
boolean forUpdate)
Remove task - this will happen if the task is cancelled, completed, etc.
|
void |
prepareForExecutionLocked(JobStatus taskStatus)
Optionally implement logic here to prepare the job to be executed.
|
void |
rescheduleForFailure(JobStatus newJob,
JobStatus failureToReschedule)
Called when a new job is being created to reschedule an old failed job.
|
public static ContentObserverController get(JobSchedulerService taskManagerService)
public static ContentObserverController getForTesting(StateChangedListener stateChangedListener, Context context)
public void maybeStartTrackingJobLocked(JobStatus taskStatus, JobStatus lastJob)
StateController
maybeStartTrackingJobLocked
in class StateController
public void prepareForExecutionLocked(JobStatus taskStatus)
StateController
prepareForExecutionLocked
in class StateController
public void maybeStopTrackingJobLocked(JobStatus taskStatus, JobStatus incomingJob, boolean forUpdate)
StateController
maybeStopTrackingJobLocked
in class StateController
public void rescheduleForFailure(JobStatus newJob, JobStatus failureToReschedule)
StateController
rescheduleForFailure
in class StateController
public void dumpControllerStateLocked(PrintWriter pw, int filterUid)
dumpControllerStateLocked
in class StateController