From 666c8011c7ea96436b40912d94e6d6097dcfdaf6 Mon Sep 17 00:00:00 2001 From: Wei Jia Date: Wed, 10 Sep 2014 10:06:11 -0700 Subject: NuPlayerDriver: do not set to paused state when receiving playback complete and reset is in progress. Bug: 17453240 Change-Id: If243e2232779681fc84dc767feaed00f23d8fdb1 --- media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp index 35cd514..7dd54c1 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp @@ -626,12 +626,15 @@ void NuPlayerDriver::notifyListener_l( switch (msg) { case MEDIA_PLAYBACK_COMPLETE: { - if (mLooping && mState != STATE_RESET_IN_PROGRESS) { - mPlayer->seekToAsync(0); - break; + if (mState != STATE_RESET_IN_PROGRESS) { + if (mLooping) { + mPlayer->seekToAsync(0); + break; + } + + mPlayer->pause(); + mState = STATE_PAUSED; } - mPlayer->pause(); - mState = STATE_PAUSED; // fall through } -- cgit v1.1