public int add ( DownloadRequest request ) { request = checkNotNull ( request , "request == null" ) ; if ( isDownloading ( request . uri ( ) . toString ( ) ) ) { return - 1 ; } request . context ( context ) ; request . downloader ( downloader . copy ( ) ) ; /* add download request into download request queue */ return downloadRequestQueue . add ( request ) ? request . downloadId ( ) : - 1 ; }
Add one download request into the queue .