public void pauseAll ( ) { FileDownloadTaskLauncher . getImpl ( ) . expireAll ( ) ; final BaseDownloadTask . IRunningTask [ ] downloadList = FileDownloadList . getImpl ( ) . copy ( ) ; for ( BaseDownloadTask . IRunningTask task : downloadList ) { task . getOrigin ( ) . pause ( ) ; } // double check, for case: File Download progress alive but ui progress has died and relived // so FileDownloadList not always contain all running task exactly. if ( FileDownloadServiceProxy . getImpl ( ) . isConnected ( ) ) { FileDownloadServiceProxy . getImpl ( ) . pauseAllTasks ( ) ; } else { PauseAllMarker . createMarker ( ) ; } }
Pause all tasks running in FileDownloader .