setInterruptIfStopped

public void setInterruptIfStopped(boolean interruptIfStopped)

Control whether code executing in onHandleWork will be interrupted if the job is stopped. By default this is false. If called and set to true, any time onStopCurrentWork is called, the class will first call AsyncTask.cancel(true) to interrupt the running task.

Parameters

interruptIfStopped

Set to true to allow the system to interrupt actively running work.