@TargetApi(Build.VERSION_CODES.O) public int enqueue(JobInfo job, Object workItem) { if (workItem == null) { return -1; } try { return getRemote().enqueue(job, (JobWorkItem) workItem); } catch (RemoteException e) { return (Integer) VirtualRuntime.crash(e); } } }
public JobInfo getPendingJob(int jobId) { try { return getRemote().getPendingJob(jobId); } catch (RemoteException e) { return (JobInfo) VirtualRuntime.crash(e); } }
public List<JobInfo> getAllPendingJobs() { try { return getRemote().getAllPendingJobs(); } catch (RemoteException e) { return VirtualRuntime.crash(e); } }
public void cancelAll() { try { getRemote().cancelAll(); } catch (RemoteException e) { e.printStackTrace(); } }
public int schedule(JobInfo job) { try { return getRemote().schedule(job); } catch (RemoteException e) { return VirtualRuntime.crash(e); } }
public void cancel(int jobId) { try { getRemote().cancel(jobId); } catch (RemoteException e) { e.printStackTrace(); } } public JobInfo getPendingJob(int jobId) {
public List<JobInfo> getAllPendingJobs() { try { return getRemote().getAllPendingJobs(); } catch (RemoteException e) { return VirtualRuntime.crash(e); } }
public void cancelAll() { try { getRemote().cancelAll(); } catch (RemoteException e) { e.printStackTrace(); } }
public int schedule(JobInfo job) { try { return getRemote().schedule(job); } catch (RemoteException e) { return VirtualRuntime.crash(e); } }
public void cancel(int jobId) { try { getRemote().cancel(jobId); } catch (RemoteException e) { e.printStackTrace(); } } }