deal with onRestart and onBufferListener