code: boolean add(DownloadRequest request) {
      /* if the request is downloading, do nothing */
      if (query(request.downloadId()) != DownloadState.INVALID
          || query(request.uri()) != DownloadState.INVALID) {
        Log.w(TAG, "the download requst is in downloading");
        return false;
      }
  
      /* tag the request as belonging to this queue */
      request.downloadRequestQueue(this);
      /* add it to the set of current requests */
      synchronized (currentRequests) {
        currentRequests.add(request);
      }
  
      /* process requests in the order they are added in */
      downloadQueue.add(request);
  
      return true;
    }
docs: Add download request to the download request queue.
  
  @param request download request
  @return true if the request is not in queue, otherwise return false