public class ConnectivityController extends StateController implements ConnectivityManager.OnNetworkActiveListener
Each app can have a different default networks or different connectivity status due to user-requested network policies, so we need to check constraints on a per-UID basis.
DEBUG, mContext, mLock, mStateChangedListener
Modifier and Type | Method and Description |
---|---|
void |
dumpControllerStateLocked(PrintWriter pw,
int filterUid) |
static ConnectivityController |
get(JobSchedulerService jms) |
void |
maybeStartTrackingJobLocked(JobStatus jobStatus,
JobStatus lastJob)
Implement the logic here to decide whether a job should be tracked by this controller.
|
void |
maybeStopTrackingJobLocked(JobStatus jobStatus,
JobStatus incomingJob,
boolean forUpdate)
Remove task - this will happen if the task is cancelled, completed, etc.
|
void |
onNetworkActive()
We know the network has just come up.
|
prepareForExecutionLocked, rescheduleForFailure
public static ConnectivityController get(JobSchedulerService jms)
public void maybeStartTrackingJobLocked(JobStatus jobStatus, JobStatus lastJob)
StateController
maybeStartTrackingJobLocked
in class StateController
public void maybeStopTrackingJobLocked(JobStatus jobStatus, JobStatus incomingJob, boolean forUpdate)
StateController
maybeStopTrackingJobLocked
in class StateController
public void onNetworkActive()
onNetworkActive
in interface ConnectivityManager.OnNetworkActiveListener
public void dumpControllerStateLocked(PrintWriter pw, int filterUid)
dumpControllerStateLocked
in class StateController