Package org.robolectric.shadows
Class ShadowJobScheduler
java.lang.Object
org.robolectric.shadows.ShadowJobScheduler
- Direct Known Subclasses:
ShadowJobScheduler.ShadowJobSchedulerImpl
@Implements(value=android.app.job.JobScheduler.class,
minSdk=21)
public abstract class ShadowJobScheduler
extends Object
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
cancel
(int jobId) protected abstract void
protected abstract int
enqueue
(JobInfo job, JobWorkItem work) abstract void
failExpeditedJob
(boolean enabled) Whether to fail a job if it is set as expedited.abstract void
failOnJob
(int jobId) abstract JobInfo
getPendingJob
(int jobId) protected abstract int
protected abstract int
scheduleAsPackage
(JobInfo job, String packageName, int userId, String tag)
-
Constructor Details
-
ShadowJobScheduler
public ShadowJobScheduler()
-
-
Method Details
-
schedule
-
scheduleAsPackage
@Implementation(minSdk=24) @HiddenApi protected abstract int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag) -
cancel
-
cancelAll
-
getAllPendingJobs
-
getPendingJob
-
enqueue
-
failOnJob
public abstract void failOnJob(int jobId) -
failExpeditedJob
public abstract void failExpeditedJob(boolean enabled) Whether to fail a job if it is set as expedited.
-