From 465faa925d3446cacb05b2fef8607cfb3502a0ff Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Fri, 26 Feb 2010 13:16:23 -0800 Subject: [PATCH] When we're in the 'playback complete' state, don't consider pausing an error. This makes 'playback complete' essentially equivalent to being paused at the end, and treats it the same as being paused at any other position. --- media/libmedia/mediaplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 2157814ad754c..d2cec0c825571 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -304,7 +304,7 @@ status_t MediaPlayer::pause() { LOGV("pause"); Mutex::Autolock _l(mLock); - if (mCurrentState & MEDIA_PLAYER_PAUSED) + if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE)) return NO_ERROR; if ((mPlayer != 0) && (mCurrentState & MEDIA_PLAYER_STARTED)) { status_t ret = mPlayer->pause();