Package org.robolectric.shadows
Class ShadowPausedAsyncTask<Params,Progress,Result>
java.lang.Object
org.robolectric.shadows.ShadowAsyncTask
org.robolectric.shadows.ShadowPausedAsyncTask<Params,Progress,Result>
- Direct Known Subclasses:
ShadowAlwaysOnHotwordDetector.ShadowRefreshAvailabilityTask
@Implements(value=android.os.AsyncTask.class,
shadowPicker=Picker.class,
isInAndroidSdk=false)
public class ShadowPausedAsyncTask<Params,Progress,Result>
extends ShadowAsyncTask
A
AsyncTask
shadow for LooperMode.Mode.PAUSED
This is beta API, and will likely be renamed/removed in a future Robolectric release.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowAsyncTask
ShadowAsyncTask.Picker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecuteOnExecutor
(Executor exec, Params... params) static void
overrideExecutor
(Executor executor) Globally override the executor used for all AsyncTask#execute* calls.static void
reset()
-
Constructor Details
-
ShadowPausedAsyncTask
public ShadowPausedAsyncTask()
-
-
Method Details
-
reset
-
executeOnExecutor
-
overrideExecutor
Globally override the executor used for all AsyncTask#execute* calls.This can be useful if you want to use a more determinstic executor for tests, like
PausedExecutorService
orInlineExecutorService
.Use this API as a last resort. Its recommended instead to use dependency injection to provide a custom executor to AsyncTask#executeOnExecutor.
Beta API, may be removed or changed in a future Robolectric release
-