Back to project page hoot.
The source code is released under:
Apache License
If you think the Android project hoot 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 com.twotoasters.android.hoot; /*from www.ja v a 2 s . c o m*/ import android.annotation.SuppressLint; import android.os.AsyncTask; import android.os.Build; public abstract class HootThreadPoolAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> { private static final boolean IS_SERIAL_EXECUTOR_BY_DEFAULT = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2; @SuppressLint("NewApi") public void executeOnThreadPoolExecutor(Params...params) { if(IS_SERIAL_EXECUTOR_BY_DEFAULT) { executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params); } else { execute(params); } } }