app/src/main/java/com/example/android/miwok/ColorsFragment.java
private void releaseMediaPlayer(){
        if(mPlayer != null){
            mPlayer.release();
            mPlayer = null;
        }

        //Release audio focus
        mAudioManager.abandonAudioFocus(mOnAudioFocusChangeListener);
    }
/**
     * Clean up the media player by releasing its resources.
     */
Clean up the media player by releasing its resources.
Clean up the media player by releasing its resources .
private void releaseMediaPlayer(){
        if(mPlayer != null){
            mPlayer.release();
            mPlayer = null;
        }
        mAudioManager.abandonAudioFocus(mOnAudioFocusChangeListener);
    }
private void releaseMediaPlayer ( ) { if ( mPlayer != null ) { mPlayer . release ( ) ; mPlayer = null ; } mAudioManager . abandonAudioFocus ( mOnAudioFocusChangeListener ) ; }
Clean up the media player by releasing its resources.
Clean up the media player by releasing its resources .
//Release audio focus