Package org.robolectric.shadows
Class ShadowJobService
java.lang.Object
org.robolectric.shadows.ShadowContextWrapper
org.robolectric.shadows.ShadowService
org.robolectric.shadows.ShadowJobService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the job has finished running.boolean
Returns whether the job needs to be rescheduled.protected void
jobFinished
(JobParameters params, boolean needsReschedule) protected void
setNotification
(JobParameters params, int notificationId, Notification notification, int jobEndNotificationPolicy) Stubbed out for now, as the real implementation throws an NPE when executed in Robolectric.protected void
updateEstimatedNetworkBytes
(JobParameters params, long downloadBytes, long uploadBytes) Stubbed out for now, as the real implementation throws an NPE when executed in Robolectric.protected void
updateTransferredNetworkBytes
(JobParameters params, long downloadBytes, long uploadBytes) Stubbed out for now, as the real implementation throws an NPE when executed in Robolectric.Methods inherited from class org.robolectric.shadows.ShadowService
getForegroundServiceType, getLastForegroundNotification, getLastForegroundNotificationId, getNotificationShouldRemoved, getStopSelfId, getStopSelfResultId, isForegroundStopped, isLastForegroundNotificationAttached, isStoppedBySelf, onDestroy, startForeground, startForeground, stopForeground, stopForeground, stopSelf, stopSelf, stopSelfResult
Methods 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
-
setNotification
@Implementation(minSdk=34) protected void setNotification(JobParameters params, int notificationId, Notification notification, int jobEndNotificationPolicy) Stubbed out for now, as the real implementation throws an NPE when executed in Robolectric. -
updateEstimatedNetworkBytes
@Implementation(minSdk=34) protected void updateEstimatedNetworkBytes(JobParameters params, long downloadBytes, long uploadBytes) Stubbed out for now, as the real implementation throws an NPE when executed in Robolectric. -
updateTransferredNetworkBytes
@Implementation(minSdk=34) protected void updateTransferredNetworkBytes(JobParameters params, long downloadBytes, long uploadBytes) Stubbed out for now, as the real implementation throws an NPE when executed in Robolectric. -
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)
.
-