Merge "libbinder_ndk: warning for transact on local objs" am: 7ee24369cd am: 923360795d
am: 0f20c9f948
Change-Id: I907394a4cf9cfd73bb8aae0a0464815a49e46863
diff --git a/libs/binder/ndk/AIBinder.cpp b/libs/binder/ndk/AIBinder.cpp
index 83972f7..b7f5636 100644
--- a/libs/binder/ndk/AIBinder.cpp
+++ b/libs/binder/ndk/AIBinder.cpp
@@ -285,6 +285,10 @@
return EX_ILLEGAL_STATE;
}
+ if (!binder->isRemote()) {
+ LOG(WARNING) << "A binder object at " << binder << " is being transacted on, however, this object is in the same process as its proxy. Transacting with this binder is expensive compared to just calling the corresponding functionality in the same process.";
+ }
+
*in = new AParcel(binder);
binder_status_t status = (**in)->writeInterfaceToken(clazz->getInterfaceDescriptor());
if (status != EX_NONE) {