@Test public void testCancelRunsService() { scheduler.cancel(0); assertEquals(shadowOf(application).getNextStartedService().getComponent().getClassName(), AlarmJobService.class.getName()); }
@Override public void cancel(int jobId) { AlarmJobService.start(context); }
AlarmScheduler extends Scheduler { @Override public void cancel(int jobId) { AlarmJobService.start(context); } }
AlarmScheduler extends Scheduler { @Override public void cancel(int jobId) { AlarmJobService.start(context); } AlarmScheduler(Context context); }
AlarmScheduler extends Scheduler { @Override public void cancel(int jobId) { AlarmJobService.start(context); } AlarmScheduler(Context context); @Override int schedule(JobInfo job); @Override void cancel(int jobId); @Override void cancelAll(); @Override void onJobCompleted(int jobId, boolean needsReschedule); @NonNull @Override String getTag(); @Override void onJobRescheduled(JobStatus newJob, JobStatus failedJob); }
AlarmScheduler extends Scheduler { @Override public void cancel(int jobId) { AlarmJobService.start(context); } AlarmScheduler(Context context); @Override int schedule(JobInfo job); @Override void cancel(int jobId); @Override void cancelAll(); @Override void onJobCompleted(int jobId, boolean needsReschedule); @NonNull @Override String getTag(); @Override void onJobRescheduled(JobStatus newJob, JobStatus failedJob); static final String TAG; }