Android MediaPlayer.reset() is invoking onCompletion

Add MediaPlayer.OnErrorLisener and return true from the overrided method

mediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() {
                    @Override
                    public boolean onError(MediaPlayer mp, int what, int extra) {
                        return true;
                    }
                });

I did a little digging through the android source and found that any unhandled errors cause MediaPlayer to call the onCompletion handler. In this case you appear to be calling getDuration in either the Idle, Initialized or Error states. Possible from inside the media controller. I'd suggest adding some Log.d() right before any places that call getDuration to see where the call causing the issue is.