@Implements(value=android.app.JobSchedulerImpl.class, isInAndroidSdk=false, minSdk=21) public static class ShadowJobScheduler.ShadowJobSchedulerImpl extends ShadowJobScheduler
ShadowJobScheduler.ShadowJobSchedulerImpl
Constructor | Description |
---|---|
ShadowJobSchedulerImpl() |
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 to
schedule(JobInfo) . |
@Implementation public int schedule(JobInfo job)
schedule
in class ShadowJobScheduler
@Implementation(minSdk=24) @HiddenApi protected int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag)
schedule(JobInfo)
. Ignores all
arguments other than job
.scheduleAsPackage
in class ShadowJobScheduler
@Implementation public void cancel(int jobId)
cancel
in class ShadowJobScheduler
@Implementation public void cancelAll()
cancelAll
in class ShadowJobScheduler
@Implementation public List<JobInfo> getAllPendingJobs()
getAllPendingJobs
in class ShadowJobScheduler
@Implementation(minSdk=24) public JobInfo getPendingJob(int jobId)
getPendingJob
in class ShadowJobScheduler
@Implementation(minSdk=26) public int enqueue(JobInfo job, JobWorkItem work)
enqueue
in class ShadowJobScheduler
public void failOnJob(int jobId)
failOnJob
in class ShadowJobScheduler