@Implements(value=android.app.job.JobService.class, minSdk=21) public class ShadowJobService extends ShadowService
Shadow for classes that extend jobservice. The shadowOf method can be used to obtain an instances shadow to view state using utility methods.
Constructor and Description |
---|
ShadowJobService() |
Modifier and Type | Method and Description |
---|---|
boolean |
getIsJobFinished()
Returns whether the job has finished running.
|
boolean |
getIsRescheduleNeeded()
Returns whether the job needs to be rescheduled.
|
protected void |
jobFinished(android.app.job.JobParameters params,
boolean needsReschedule) |
getLastForegroundNotification, getLastForegroundNotificationId, getNotificationShouldRemoved, isForegroundStopped, isStoppedBySelf, onDestroy, startForeground, stopForeground, stopSelf, stopSelf, stopSelfResult
clearNextStartedActivities, clearStartedServices, denyPermissions, getBroadcastIntents, getNextStartedActivity, getNextStartedService, getNextStoppedService, grantPermissions, peekNextStartedActivity, peekNextStartedService, removeSystemService
@Implementation protected void jobFinished(android.app.job.JobParameters params, boolean needsReschedule)
public boolean getIsJobFinished()
Returns whether the job has finished running. When using this shadow this returns true after jobFinished(JobParameters, boolean)
is called.
public boolean getIsRescheduleNeeded()
Returns whether the job needs to be rescheduled. When using this shadow it returns the last value passed into jobFinished(JobParameters, boolean)
.