Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e44b41ba authored by Marco Nelissen's avatar Marco Nelissen
Browse files

MEDIA_PLAYER_STATE_ERROR is not a bitmask

(b/2502881)

Change-Id: I08e427eb2c36f5d70e40f9aeb8638fa8262de989
parent a8fbe1fb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -104,7 +104,8 @@ status_t MediaPlayer::setDataSource(const sp<IMediaPlayer>& player)
    { // scope for the lock
        Mutex::Autolock _l(mLock);

        if ( !( mCurrentState & ( MEDIA_PLAYER_IDLE | MEDIA_PLAYER_STATE_ERROR ) ) ) {
        if ( !( (mCurrentState & MEDIA_PLAYER_IDLE) ||
                (mCurrentState == MEDIA_PLAYER_STATE_ERROR ) ) ) {
            LOGE("setDataSource called in state %d", mCurrentState);
            return INVALID_OPERATION;
        }