• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package android.os;
2 
3 import com.xtremelabs.robolectric.internal.DoNotInstrument;
4 
5 @DoNotInstrument
6 public class ShadowAsyncTaskBridge<Params, Progress, Result> {
7     private AsyncTask<Params, Progress, Result> asyncTask;
8 
ShadowAsyncTaskBridge(AsyncTask<Params, Progress, Result> asyncTask)9     public ShadowAsyncTaskBridge(AsyncTask<Params, Progress, Result> asyncTask) {
10         this.asyncTask = asyncTask;
11     }
12 
doInBackground(Params... params)13     public Result doInBackground(Params... params) {
14         return asyncTask.doInBackground(params);
15     }
16 
onPreExecute()17     public void onPreExecute() {
18         asyncTask.onPreExecute();
19     }
20 
onPostExecute(Result result)21     public void onPostExecute(Result result) {
22         asyncTask.onPostExecute(result);
23     }
24 
onProgressUpdate(Progress... values)25     public void onProgressUpdate(Progress... values) {
26         asyncTask.onProgressUpdate(values);
27     }
28 
onCancelled()29     public void onCancelled() {
30         asyncTask.onCancelled();
31     }
32 }
33