summaryrefslogtreecommitdiffstats
path: root/media/libmedia
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2010-02-26 13:16:23 -0800
committerMarco Nelissen <marcone@google.com>2010-02-26 13:16:23 -0800
commit465faa925d3446cacb05b2fef8607cfb3502a0ff (patch)
tree6cc081f07b7682043cbfef16e7e96ea40d1b4656 /media/libmedia
parent16f6354be4bd649c0da66cf75f11f1088293aca2 (diff)
downloadframeworks_base-465faa925d3446cacb05b2fef8607cfb3502a0ff.zip
frameworks_base-465faa925d3446cacb05b2fef8607cfb3502a0ff.tar.gz
frameworks_base-465faa925d3446cacb05b2fef8607cfb3502a0ff.tar.bz2
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.
Diffstat (limited to 'media/libmedia')
-rw-r--r--media/libmedia/mediaplayer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 2157814..d2cec0c 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();