/** Cancel the background task. */ public void cancel() { if (mRunning) { mTask.cancel(false); mTask = null; mRunning = false; } }
/** Start the background task. */ public void start() throws ExecutionException, InterruptedException { if (!mRunning) { mTask = new TrailerParse(); mTask.execute().get(); mRunning = true; } }