Class ShadowLegacyAsyncTask<Params,​Progress,​Result>


  • @Implements(value=android.os.AsyncTask.class,
                shadowPicker=Picker.class,
                isInAndroidSdk=false)
    public class ShadowLegacyAsyncTask<Params,​Progress,​Result>
    extends ShadowAsyncTask
    A AsyncTask shadow for LooperMode.Mode.LEGACY.
    • Constructor Detail

      • ShadowLegacyAsyncTask

        public ShadowLegacyAsyncTask()
    • Method Detail

      • isCancelled

        @Implementation
        protected boolean isCancelled()
      • cancel

        @Implementation
        protected boolean cancel​(boolean mayInterruptIfRunning)
      • get

        @Implementation
        protected Result get()
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • get

        @Implementation
        protected Result get​(long timeout,
                             java.util.concurrent.TimeUnit unit)
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException,
                             java.util.concurrent.TimeoutException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.util.concurrent.TimeoutException
      • executeOnExecutor

        @Implementation
        protected android.os.AsyncTask<Params,​Progress,​Result> executeOnExecutor​(java.util.concurrent.Executor executor,
                                                                                             Params... params)
      • getStatus

        @Implementation
        protected android.os.AsyncTask.Status getStatus()
      • publishProgress

        @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).
        Parameters:
        values - The progress values to update the UI with.
        See Also:
        AsyncTask.publishProgress(Object[])