Class ShadowPausedAsyncTask<Params,​Progress,​Result>

    • Constructor Detail

      • ShadowPausedAsyncTask

        public ShadowPausedAsyncTask()
    • Method Detail

      • reset

        @Resetter
        public static void reset()
      • overrideExecutor

        public static void overrideExecutor​(Executor executor)
        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 or InlineExecutorService.

        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