@Override
 public void cancel() {
   if (mConnectTask != null) {
     mConnectTask.cancel();
   }
   for (DownloadTask task : mDownloadTasks) {
     task.cancel();
   }
 }
 private boolean isAllCanceled() {
   boolean allCanceled = true;
   for (DownloadTask task : mDownloadTasks) {
     if (task.isDownloading()) {
       allCanceled = false;
       break;
     }
   }
   return allCanceled;
 }
 private boolean isAllComplete() {
   boolean allFinished = true;
   for (DownloadTask task : mDownloadTasks) {
     if (!task.isComplete()) {
       allFinished = false;
       break;
     }
   }
   return allFinished;
 }