Package org.robolectric.shadows
Class ShadowJobService
java.lang.Object
org.robolectric.shadows.ShadowContextWrapper
org.robolectric.shadows.ShadowService
org.robolectric.shadows.ShadowJobService
@Implements(value=android.app.job.JobService.class, minSdk=21) public class ShadowJobService extends ShadowService
-
Constructor Summary
Constructors Constructor Description ShadowJobService() -
Method Summary
Modifier and Type Method Description booleangetIsJobFinished()Returns whether the job has finished running.booleangetIsRescheduleNeeded()Returns whether the job needs to be rescheduled.protected voidjobFinished(JobParameters params, boolean needsReschedule)Methods inherited from class org.robolectric.shadows.ShadowService
getForegroundServiceType, getLastForegroundNotification, getLastForegroundNotificationId, getNotificationShouldRemoved, getStopSelfId, getStopSelfResultId, isForegroundStopped, isLastForegroundNotificationAttached, isStoppedBySelf, onDestroy, startForeground, startForeground, stopForeground, stopForeground, stopSelf, stopSelf, stopSelfResultMethods inherited from class org.robolectric.shadows.ShadowContextWrapper
clearBroadcastIntents, clearNextStartedActivities, clearStartedServices, denyPermissions, denyPermissions, getAllStartedServices, getBroadcastIntents, getBroadcastIntentsForUser, getBroadcastOptions, getNextStartedActivity, getNextStartedActivityForResult, getNextStartedService, getNextStoppedService, grantPermissions, grantPermissions, peekNextStartedActivity, peekNextStartedActivityForResult, peekNextStartedService, removeSystemService
-
Constructor Details
-
ShadowJobService
public ShadowJobService()
-
-
Method Details
-
jobFinished
-
getIsJobFinished
public boolean getIsJobFinished()Returns whether the job has finished running. When using this shadow this returns true afterjobFinished(JobParameters, boolean)is called. -
getIsRescheduleNeeded
public boolean getIsRescheduleNeeded()Returns whether the job needs to be rescheduled. When using this shadow it returns the last value passed intojobFinished(JobParameters, boolean).
-