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