Back to project page AndroidWifiServer.
The source code is released under:
Apache License
If you think the Android project AndroidWifiServer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package jp.maju.wifiserver; /*from w w w . j a v a 2s. c o m*/ import android.os.AsyncTask; import android.os.Build; /** * ??????????AsyncTask?????????????? * * @author Junpei_MATSUDA * * @param <Params> * @param <Progress> * @param <Result> */ public abstract class AsyncExecutionTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> { public interface ExecuteCycleListner { void onPreexecPhase(String message, int stringId); void onPostexecPhase(String message, int stringId); void onBeginexecPhase(String message, int stringId); void onEndexecPhase(String message, int stringId); } protected ExecuteCycleListner mExecuteCycleListner; public void setExecuteCycleListener(ExecuteCycleListner mExecuteCycleListner) { this.mExecuteCycleListner = mExecuteCycleListner; } @Override protected void onProgressUpdate(Progress... values) { super.onProgressUpdate(values); } public AsyncTask<Params, Progress, Result> exec(Params... params) { if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.GINGERBREAD_MR1) { return execute(params); } else { return executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params); } } }