diff --git a/libs/binder/IInterface.cpp b/libs/binder/IInterface.cpp index 8c60dc4f7..2fcd3d92f 100644 --- a/libs/binder/IInterface.cpp +++ b/libs/binder/IInterface.cpp @@ -14,6 +14,8 @@ * limitations under the License. */ +#define LOG_TAG "IInterface" +#include #include namespace android { @@ -41,6 +43,25 @@ sp IInterface::asBinder(const sp& iface) return iface->onAsBinder(); } + // --------------------------------------------------------------------------- }; // namespace android + +extern "C" { + +void _ZN7android10IInterface8asBinderEv(void *retval, void* self) { + ALOGW("deprecated asBinder call, please update your code"); + //ALOGI("self: %p, retval: %p", self, retval); + android::sp *ret = new(retval) android::sp; + *ret = android::IInterface::asBinder((android::IInterface*)self); +} + +void _ZNK7android10IInterface8asBinderEv(void *retval, void *self) { + ALOGW("deprecated asBinder call, please update your code"); + //ALOGI("self: %p, retval: %p", self, retval); + android::sp *ret = new(retval) android::sp; + *ret = android::IInterface::asBinder((android::IInterface*)self); +} + +} // extern "C"