code: boolean cancel(int downloadId) {
      synchronized (currentRequests) {
        for (DownloadRequest request : currentRequests) {
          if (request.downloadId() == downloadId) {
            request.cancel();
            return true;
          }
        }
      }
  
      return false;
    }
docs: Cancel a download in progress.
  
  @param downloadId download id
  @return true if download has canceled, otherwise return false