Lines Matching refs:mMediaPlayer

76     private MediaPlayer mMediaPlayer;  field in Playback
137 return mPlayOnFocusGain || (mMediaPlayer != null && mMediaPlayer.isPlaying()); in isPlaying()
141 return mMediaPlayer != null ? in getCurrentStreamPosition()
142 mMediaPlayer.getCurrentPosition() : mCurrentPosition; in getCurrentStreamPosition()
156 if (mState == PlaybackState.STATE_PAUSED && !mediaHasChanged && mMediaPlayer != null) { in play()
171 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); in play()
172 mMediaPlayer.setDataSource(source); in play()
179 mMediaPlayer.prepareAsync(); in play()
202 if (mMediaPlayer != null && mMediaPlayer.isPlaying()) { in pause()
203 mMediaPlayer.pause(); in pause()
204 mCurrentPosition = mMediaPlayer.getCurrentPosition(); in pause()
220 if (mMediaPlayer == null) { in seekTo()
224 if (mMediaPlayer.isPlaying()) { in seekTo()
227 mMediaPlayer.seekTo(position); in seekTo()
283 mMediaPlayer.setVolume(VOLUME_DUCK, VOLUME_DUCK); // we'll be relatively quiet in configMediaPlayerState()
285 if (mMediaPlayer != null) { in configMediaPlayerState()
286 mMediaPlayer.setVolume(VOLUME_NORMAL, VOLUME_NORMAL); // we can be loud again in configMediaPlayerState()
291 if (mMediaPlayer != null && !mMediaPlayer.isPlaying()) { in configMediaPlayerState()
294 if (mCurrentPosition == mMediaPlayer.getCurrentPosition()) { in configMediaPlayerState()
295 mMediaPlayer.start(); in configMediaPlayerState()
298 mMediaPlayer.seekTo(mCurrentPosition); in configMediaPlayerState()
352 mMediaPlayer.start(); in onSeekComplete()
410 LogHelper.d(TAG, "createMediaPlayerIfNeeded. needed? ", (mMediaPlayer==null)); in createMediaPlayerIfNeeded()
411 if (mMediaPlayer == null) { in createMediaPlayerIfNeeded()
412 mMediaPlayer = new MediaPlayer(); in createMediaPlayerIfNeeded()
417 mMediaPlayer.setWakeMode(mService.getApplicationContext(), in createMediaPlayerIfNeeded()
422 mMediaPlayer.setOnPreparedListener(this); in createMediaPlayerIfNeeded()
423 mMediaPlayer.setOnCompletionListener(this); in createMediaPlayerIfNeeded()
424 mMediaPlayer.setOnErrorListener(this); in createMediaPlayerIfNeeded()
425 mMediaPlayer.setOnSeekCompleteListener(this); in createMediaPlayerIfNeeded()
427 mMediaPlayer.reset(); in createMediaPlayerIfNeeded()
444 if (releaseMediaPlayer && mMediaPlayer != null) { in relaxResources()
445 mMediaPlayer.reset(); in relaxResources()
446 mMediaPlayer.release(); in relaxResources()
447 mMediaPlayer = null; in relaxResources()