summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2015-03-31 22:10:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-31 22:10:48 +0000
commitb1b219368026cf19c5a38c40eb472715f8e5d707 (patch)
tree097c1c10dda9cb1443a58ae12a60ba435b4daebe /libs
parent943f0a45d055a9f9ddce4d2628647d9114dcaa86 (diff)
parent5c6ec52ff8ab4e8471f98fe4fcde64221b23d72a (diff)
downloadframeworks_native-b1b219368026cf19c5a38c40eb472715f8e5d707.zip
frameworks_native-b1b219368026cf19c5a38c40eb472715f8e5d707.tar.gz
frameworks_native-b1b219368026cf19c5a38c40eb472715f8e5d707.tar.bz2
Merge "Add backwards compatible versions of IInterface::asBinder()"
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/IInterface.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/binder/IInterface.cpp b/libs/binder/IInterface.cpp
index 8c60dc4..2fcd3d9 100644
--- a/libs/binder/IInterface.cpp
+++ b/libs/binder/IInterface.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define LOG_TAG "IInterface"
+#include <utils/Log.h>
#include <binder/IInterface.h>
namespace android {
@@ -41,6 +43,25 @@ sp<IBinder> IInterface::asBinder(const sp<IInterface>& 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<android::IBinder> *ret = new(retval) android::sp<android::IBinder>;
+ *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<android::IBinder> *ret = new(retval) android::sp<android::IBinder>;
+ *ret = android::IInterface::asBinder((android::IInterface*)self);
+}
+
+} // extern "C"