public void pause ( ) { synchronized ( finishCallback ) { if ( paused ) { FileDownloadLog . w ( this , "require pause this queue(remain %d), but " + "it has already been paused" , mTasks . size ( ) ) ; return ; } paused = true ; mTasks . drainTo ( pausedList ) ; if ( workingTask != null ) { workingTask . removeFinishListener ( finishCallback ) ; workingTask . pause ( ) ; } } }
Pause the queue .