private boolean isReadyToBeExecutedLocked(JobStatus job){
  final boolean jobReady=job.isReady();
  final boolean jobPending=mPendingJobs.contains(job);
  final boolean jobActive=isCurrentlyActiveLocked(job);
  final boolean userRunning=mStartedUsers.contains(job.getUserId());
  return userRunning && jobReady && !jobPending&& !jobActive;
}

private boolean isReadyToBeExecutedLocked ( JobStatus job ) { final boolean jobReady = job . isReady ( ) ; final boolean jobPending = mPendingJobs . contains ( job ) ; final boolean jobActive = isCurrentlyActiveLocked ( job ) ; final boolean userRunning = mStartedUsers . contains ( job . getUserId ( ) ) ; return userRunning && jobReady && ! jobPending && ! jobActive ; }
criteria for moving a job into the pending queue : - it ' s ready . - it ' s not pending . - it ' s not already running on a jsc . - the user that requested the job is running .
