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

Commit fa8b4792 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

stagefright: remove AMessage methods using id()

Bug: 19607784
Change-Id: I4b2ca396fb50cde5e7dc9801add69037febe698d
parent 1d15ab58
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -38,9 +38,6 @@ struct ALooperRoster {

    void postReply(uint32_t replyID, const sp<AMessage> &reply);

    void getHandlerAndLooper(
            ALooper::handler_id handlerID, wp<AHandler> *handler, wp<ALooper> *looper);

    void dump(int fd, const Vector<String16>& args);

private:
+0 −2
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ struct Parcel;

struct AMessage : public RefBase {
    AMessage();
    AMessage(uint32_t what, ALooper::handler_id target = 0);
    AMessage(uint32_t what, const sp<const AHandler> &handler);

    static sp<AMessage> FromParcel(const Parcel &parcel);
@@ -41,7 +40,6 @@ struct AMessage : public RefBase {
    void setWhat(uint32_t what);
    uint32_t what() const;

    void setTarget(ALooper::handler_id target);
    void setTarget(const sp<const AHandler> &handler);

    void clear();
+0 −16
Original line number Diff line number Diff line
@@ -100,22 +100,6 @@ void ALooperRoster::unregisterStaleHandlers() {
    }
}

void ALooperRoster::getHandlerAndLooper(
        ALooper::handler_id handlerID, wp<AHandler> *handler, wp<ALooper> *looper) {
    Mutex::Autolock autoLock(mLock);

    ssize_t index = mHandlers.indexOfKey(handlerID);

    if (index < 0) {
        handler->clear();
        looper->clear();
        return;
    }

    *handler = mHandlers.valueAt(index).mHandler;
    *looper = mHandlers.valueAt(index).mLooper;
}

status_t ALooperRoster::postAndAwaitResponse(
        const sp<AMessage> &msg, sp<AMessage> *response) {
    Mutex::Autolock autoLock(mLock);
+0 −12
Original line number Diff line number Diff line
@@ -43,13 +43,6 @@ AMessage::AMessage(void)
      mNumItems(0) {
}

AMessage::AMessage(uint32_t what, ALooper::handler_id target)
    : mWhat(what),
      mTarget(0),
      mNumItems(0) {
    setTarget(target);
}

AMessage::AMessage(uint32_t what, const sp<const AHandler> &handler)
    : mWhat(what),
      mNumItems(0) {
@@ -68,11 +61,6 @@ uint32_t AMessage::what() const {
    return mWhat;
}

void AMessage::setTarget(ALooper::handler_id handlerID) {
    mTarget = handlerID;
    gLooperRoster.getHandlerAndLooper(handlerID, &mHandler, &mLooper);
}

void AMessage::setTarget(const sp<const AHandler> &handler) {
    if (handler == NULL) {
        mTarget = 0;