Revert "Allow invoke in all the player states except idle and error."

This reverts commit 88f3b81d06.
This commit is contained in:
Nicolas Catania
2010-03-11 08:16:26 -08:00
parent 2e40183638
commit df2d3cdca7

View File

@@ -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);
}