Methods Summary |
---|
public void | dumpControllerState(java.io.PrintWriter pw)
synchronized (mTrackedTasks) {
pw.print("Idle: ");
pw.println(mIdleTracker.isIdle() ? "true" : "false");
pw.println(mTrackedTasks.size());
for (int i = 0; i < mTrackedTasks.size(); i++) {
final JobStatus js = mTrackedTasks.get(i);
pw.print(" ");
pw.print(String.valueOf(js.hashCode()).substring(0, 3));
pw.println("..");
}
}
|
public static com.android.server.job.controllers.IdleController | get(com.android.server.job.JobSchedulerService service)
synchronized (sCreationLock) {
if (sController == null) {
sController = new IdleController(service, service.getContext());
}
return sController;
}
|
private void | initIdleStateTracking()Idle state tracking, and messaging with the task manager when
significant state changes occur
mIdleTracker = new IdlenessTracker();
mIdleTracker.startTracking();
|
public void | maybeStartTrackingJob(JobStatus taskStatus)StateController interface
if (taskStatus.hasIdleConstraint()) {
synchronized (mTrackedTasks) {
mTrackedTasks.add(taskStatus);
taskStatus.idleConstraintSatisfied.set(mIdleTracker.isIdle());
}
}
|
public void | maybeStopTrackingJob(JobStatus taskStatus)
synchronized (mTrackedTasks) {
mTrackedTasks.remove(taskStatus);
}
|
void | reportNewIdleState(boolean isIdle)Interaction with the task manager service
synchronized (mTrackedTasks) {
for (JobStatus task : mTrackedTasks) {
task.idleConstraintSatisfied.set(isIdle);
}
}
mStateChangedListener.onControllerStateChanged();
|