Package org.robolectric.shadows
Class ShadowLegacyAsyncTask<Params,Progress,Result>
- java.lang.Object
-
- org.robolectric.shadows.ShadowAsyncTask
-
- org.robolectric.shadows.ShadowLegacyAsyncTask<Params,Progress,Result>
-
@Implements(value=android.os.AsyncTask.class, shadowPicker=Picker.class, isInAndroidSdk=false) public class ShadowLegacyAsyncTask<Params,Progress,Result> extends ShadowAsyncTask
AAsyncTask
shadow forLooperMode.Mode.LEGACY
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowAsyncTask
ShadowAsyncTask.Picker
-
-
Constructor Summary
Constructors Constructor Description ShadowLegacyAsyncTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
cancel(boolean mayInterruptIfRunning)
protected FutureTask<Result>
createFuture(Callable<Result> callable)
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 toAsyncTask.onProgressUpdate(Object[])
on UI looper (or run it immediately if the looper it is not paused).
-
-
-
Method Detail
-
createFuture
protected FutureTask<Result> createFuture(Callable<Result> callable)
-
isCancelled
@Implementation protected boolean isCancelled()
-
cancel
@Implementation protected boolean cancel(boolean mayInterruptIfRunning)
-
get
@Implementation protected Result get() throws InterruptedException, ExecutionException
-
get
@Implementation protected Result get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
-
executeOnExecutor
@Implementation protected AsyncTask<Params,Progress,Result> executeOnExecutor(Executor executor, Params... params)
-
getStatus
@Implementation protected AsyncTask.Status getStatus()
-
publishProgress
@Implementation protected void publishProgress(Progress... values)
Enqueue a call toAsyncTask.onProgressUpdate(Object[])
on UI looper (or run it immediately if the looper it is not paused).- Parameters:
values
- The progress values to update the UI with.- See Also:
AsyncTask.publishProgress(Object[])
-
-