FileDocCategorySizeDatePackage
StateController.javaAPI DocAndroid 5.1 API2055Thu Mar 12 22:22:42 GMT 2015com.android.server.job.controllers

StateController

public abstract class StateController extends Object
Incorporates shared controller logic between the various controllers of the JobManager. These are solely responsible for tracking a list of jobs, and notifying the JM when these are ready to run, or whether they must be stopped.

Fields Summary
protected static final boolean
DEBUG
protected android.content.Context
mContext
protected com.android.server.job.StateChangedListener
mStateChangedListener
Constructors Summary
public StateController(com.android.server.job.StateChangedListener stateChangedListener, android.content.Context context)


         
        mStateChangedListener = stateChangedListener;
        mContext = context;
    
Methods Summary
public abstract voiddumpControllerState(java.io.PrintWriter pw)

public abstract voidmaybeStartTrackingJob(JobStatus jobStatus)
Implement the logic here to decide whether a job should be tracked by this controller. This logic is put here so the JobManger can be completely agnostic of Controller logic. Also called when updating a task, so implementing controllers have to be aware of preexisting tasks.

public abstract voidmaybeStopTrackingJob(JobStatus jobStatus)
Remove task - this will happen if the task is cancelled, completed, etc.