What is the correct way to disconnect MediaControllerwith attached MediaPlayer?
You cannot do mediaController.setMediaPlayer(null)- which immediately calls updatePausePlay, which divides zero.
You cannot call mediaPlayer.release(), as MediaController will call MediaPlayer # getCurrentPosition and throw an IllegalStateException after the call release().
source
share