Package org.robolectric.shadows
Class ShadowJobScheduler.ShadowJobSchedulerImpl
- java.lang.Object
-
- org.robolectric.shadows.ShadowJobScheduler
-
- org.robolectric.shadows.ShadowJobScheduler.ShadowJobSchedulerImpl
-
- Enclosing class:
- ShadowJobScheduler
@Implements(value=android.app.JobSchedulerImpl.class, isInAndroidSdk=false, minSdk=21) public static class ShadowJobScheduler.ShadowJobSchedulerImpl extends ShadowJobScheduler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowJobScheduler
ShadowJobScheduler.ShadowJobSchedulerImpl
-
-
Constructor Summary
Constructors Constructor Description ShadowJobSchedulerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel(int jobId)
void
cancelAll()
int
enqueue(JobInfo job, JobWorkItem work)
void
failOnJob(int jobId)
List<JobInfo>
getAllPendingJobs()
JobInfo
getPendingJob(int jobId)
int
schedule(JobInfo job)
protected int
scheduleAsPackage(JobInfo job, String packageName, int userId, String tag)
Simple implementation redirecting all calls toschedule(JobInfo)
.
-
-
-
Method Detail
-
schedule
@Implementation public int schedule(JobInfo job)
- Specified by:
schedule
in classShadowJobScheduler
-
scheduleAsPackage
@Implementation(minSdk=24) @HiddenApi protected int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag)
Simple implementation redirecting all calls toschedule(JobInfo)
. Ignores all arguments other thanjob
.- Specified by:
scheduleAsPackage
in classShadowJobScheduler
-
cancel
@Implementation public void cancel(int jobId)
- Specified by:
cancel
in classShadowJobScheduler
-
cancelAll
@Implementation public void cancelAll()
- Specified by:
cancelAll
in classShadowJobScheduler
-
getAllPendingJobs
@Implementation public List<JobInfo> getAllPendingJobs()
- Specified by:
getAllPendingJobs
in classShadowJobScheduler
-
getPendingJob
@Implementation(minSdk=24) public JobInfo getPendingJob(int jobId)
- Specified by:
getPendingJob
in classShadowJobScheduler
-
enqueue
@Implementation(minSdk=26) public int enqueue(JobInfo job, JobWorkItem work)
- Specified by:
enqueue
in classShadowJobScheduler
-
failOnJob
public void failOnJob(int jobId)
- Specified by:
failOnJob
in classShadowJobScheduler
-
-