@Implements(value=android.os.AsyncTask.class) public class ShadowAsyncTask<Params,Progress,Result> extends Object
Constructor and Description |
---|
ShadowAsyncTask() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
cancel(boolean mayInterruptIfRunning) |
protected AsyncTask<Params,Progress,Result> |
execute(Params... params) |
protected AsyncTask<Params,Progress,Result> |
executeOnExecutor(Executor executor,
Params... params) |
protected Result |
get() |
protected Result |
get(long timeout,
TimeUnit unit) |
protected AsyncTask.Status |
getStatus() |
protected boolean |
isCancelled() |
protected void |
publishProgress(Progress... values)
Enqueue a call to
AsyncTask.onProgressUpdate(Object[]) on UI looper (or run it immediately if the looper it is not paused). |
@Implementation protected boolean isCancelled()
@Implementation protected boolean cancel(boolean mayInterruptIfRunning)
@Implementation protected Result get() throws InterruptedException, ExecutionException
@Implementation protected Result get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
@Implementation protected AsyncTask<Params,Progress,Result> executeOnExecutor(Executor executor, Params... params)
@Implementation protected AsyncTask.Status getStatus()
@Implementation protected void publishProgress(Progress... values)
Enqueue a call to AsyncTask.onProgressUpdate(Object[])
on UI looper (or run it immediately if the looper it is not paused).
values
- The progress values to update the UI with.AsyncTask.publishProgress(Object[])