stagefright: remove AMessage methods using id()

Bug: 19607784
Change-Id: I4b2ca396fb50cde5e7dc9801add69037febe698d
diff --git a/include/media/stagefright/foundation/ALooperRoster.h b/include/media/stagefright/foundation/ALooperRoster.h
index 63d52d9..96bce6b 100644
--- a/include/media/stagefright/foundation/ALooperRoster.h
+++ b/include/media/stagefright/foundation/ALooperRoster.h
@@ -38,9 +38,6 @@
 
     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:
diff --git a/include/media/stagefright/foundation/AMessage.h b/include/media/stagefright/foundation/AMessage.h
index beaefdd..ab3279d 100644
--- a/include/media/stagefright/foundation/AMessage.h
+++ b/include/media/stagefright/foundation/AMessage.h
@@ -32,7 +32,6 @@
 
 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 @@
     void setWhat(uint32_t what);
     uint32_t what() const;
 
-    void setTarget(ALooper::handler_id target);
     void setTarget(const sp<const AHandler> &handler);
 
     void clear();
diff --git a/media/libstagefright/foundation/ALooperRoster.cpp b/media/libstagefright/foundation/ALooperRoster.cpp
index 3484579..c4e6788 100644
--- a/media/libstagefright/foundation/ALooperRoster.cpp
+++ b/media/libstagefright/foundation/ALooperRoster.cpp
@@ -100,22 +100,6 @@
     }
 }
 
-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);
diff --git a/media/libstagefright/foundation/AMessage.cpp b/media/libstagefright/foundation/AMessage.cpp
index fbc321f..d4add15 100644
--- a/media/libstagefright/foundation/AMessage.cpp
+++ b/media/libstagefright/foundation/AMessage.cpp
@@ -43,13 +43,6 @@
       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 @@
     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;