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

Commit 83013e6d authored by Wei Jia's avatar Wei Jia Committed by android-build-merger
Browse files

Merge "mediaplayer: fix logging message." into nyc-dev

am: da626b0e

* commit 'da626b0e':
  mediaplayer: fix logging message.
parents 94f16051 da626b0e
Loading
Loading
Loading
Loading
+8 −7
Original line number Original line Diff line number Diff line
@@ -207,7 +207,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply)
        ALOGV("invoke %zu", request.dataSize());
        ALOGV("invoke %zu", request.dataSize());
        return  mPlayer->invoke(request, reply);
        return  mPlayer->invoke(request, reply);
    }
    }
    ALOGE("invoke failed: wrong state %X", mCurrentState);
    ALOGE("invoke failed: wrong state %X, mPlayer(%p)", mCurrentState, mPlayer.get());
    return INVALID_OPERATION;
    return INVALID_OPERATION;
}
}


@@ -252,7 +252,7 @@ status_t MediaPlayer::prepareAsync_l()
        mCurrentState = MEDIA_PLAYER_PREPARING;
        mCurrentState = MEDIA_PLAYER_PREPARING;
        return mPlayer->prepareAsync();
        return mPlayer->prepareAsync();
    }
    }
    ALOGE("prepareAsync called in state %d", mCurrentState);
    ALOGE("prepareAsync called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get());
    return INVALID_OPERATION;
    return INVALID_OPERATION;
}
}


@@ -318,7 +318,7 @@ status_t MediaPlayer::start()
            }
            }
        }
        }
    } else {
    } else {
        ALOGE("start called in state %d", mCurrentState);
        ALOGE("start called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get());
        ret = INVALID_OPERATION;
        ret = INVALID_OPERATION;
    }
    }


@@ -342,7 +342,7 @@ status_t MediaPlayer::stop()
        }
        }
        return ret;
        return ret;
    }
    }
    ALOGE("stop called in state %d", mCurrentState);
    ALOGE("stop called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get());
    return INVALID_OPERATION;
    return INVALID_OPERATION;
}
}


@@ -361,7 +361,7 @@ status_t MediaPlayer::pause()
        }
        }
        return ret;
        return ret;
    }
    }
    ALOGE("pause called in state %d", mCurrentState);
    ALOGE("pause called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get());
    return INVALID_OPERATION;
    return INVALID_OPERATION;
}
}


@@ -484,7 +484,8 @@ status_t MediaPlayer::getDuration_l(int *msec)
        }
        }
        return ret;
        return ret;
    }
    }
    ALOGE("Attempt to call getDuration without a valid mediaplayer");
    ALOGE("Attempt to call getDuration in wrong state: mPlayer=%p, mCurrentState=%u",
            mPlayer.get(), mCurrentState);
    return INVALID_OPERATION;
    return INVALID_OPERATION;
}
}


@@ -691,7 +692,7 @@ status_t MediaPlayer::attachAuxEffect(int effectId)
    if (mPlayer == 0 ||
    if (mPlayer == 0 ||
        (mCurrentState & MEDIA_PLAYER_IDLE) ||
        (mCurrentState & MEDIA_PLAYER_IDLE) ||
        (mCurrentState == MEDIA_PLAYER_STATE_ERROR )) {
        (mCurrentState == MEDIA_PLAYER_STATE_ERROR )) {
        ALOGE("attachAuxEffect called in state %d", mCurrentState);
        ALOGE("attachAuxEffect called in state %d, mPlayer(%p)", mCurrentState, mPlayer.get());
        return INVALID_OPERATION;
        return INVALID_OPERATION;
    }
    }