Back to project page PDF2ImageForEP.
The source code is released under:
GNU General Public License
If you think the Android project PDF2ImageForEP 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.artifex.mupdf; //w w w . j a v a2s. c o m import android.os.AsyncTask; import java.util.concurrent.RejectedExecutionException; public abstract class SafeAsyncTask<Params, Progress, Result> extends AsyncTask<Params, Progress, Result> { public void safeExecute(Params... params) { try { execute(params); } catch(RejectedExecutionException e) { // Failed to start in the background, so do it in the foreground onPreExecute(); if (isCancelled()) { onCancelled(); } else { onPostExecute(doInBackground(params)); } } } }