From df2d3cdca77edc309fccf8097a1682b1ef72443a Mon Sep 17 00:00:00 2001 From: Nicolas Catania Date: Thu, 11 Mar 2010 08:16:26 -0800 Subject: [PATCH] Revert "Allow invoke in all the player states except idle and error." This reverts commit 88f3b81d065d4bec6f69a25eda99158e254f55b1. --- media/libmedia/mediaplayer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp index 9fc06cde493ff..f623295be76e7 100644 --- a/media/libmedia/mediaplayer.cpp +++ b/media/libmedia/mediaplayer.cpp @@ -159,10 +159,8 @@ status_t MediaPlayer::setDataSource(int fd, int64_t offset, int64_t length) status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply) { Mutex::Autolock _l(mLock); - const bool hasBeenInitialized = - (mCurrentState != MEDIA_PLAYER_STATE_ERROR) && - ((mCurrentState & MEDIA_PLAYER_IDLE) != MEDIA_PLAYER_STATE_IDLE); - if ((mPlayer != NULL) && hasBeenInitialized) { + if ((mPlayer != NULL) && ( mCurrentState & MEDIA_PLAYER_INITIALIZED )) + { LOGV("invoke %d", request.dataSize()); return mPlayer->invoke(request, reply); }