public void cancelJobsForUid(int uid){
  List<JobStatus> jobsForUid;
synchronized (mJobs) {
    jobsForUid=mJobs.getJobsByUid(uid);
  }
  for (int i=0; i < jobsForUid.size(); i++) {
    JobStatus toRemove=jobsForUid.get(i);
    cancelJobImpl(toRemove);
  }
}

public void cancelJobsForUid ( int uid ) { List < JobStatus > jobsForUid ; synchronized ( mJobs ) { jobsForUid = mJobs . getJobsByUid ( uid ) ; } for ( int i = 0 ; i < jobsForUid . size ( ) ; i ++ ) { JobStatus toRemove = jobsForUid . get ( i ) ; cancelJobImpl ( toRemove ) ; } }
entry point from client to cancel all jobs originating from their uid . this will remove the job from the master list , and cancel the job if it was staged for execution or being executed .
