title: What's the right way to disconnect a MediaController?
body: <p>What's the right way to shut down a <code>MediaController</code> with an attached <code>MediaPlayer</code>?</p>
  
  <p>You can't do <code>mediaController.setMediaPlayer(null)</code> - that immediately calls updatePausePlay, which dereferences the null.</p>
  
  <p>You can't call <code>mediaPlayer.release()</code>, since MediaController is going to call MediaPlayer#getCurrentPosition, and that throws an IllegalStateException after <code>release()</code> has been called.</p>