libbinder: BBinder descriptor
Two reasons:
- expose information to client (helps debugging)
- client code re-fetches blank descriptor
libbinder_ndk always requires a descriptor and
JavaBBinder overrides this method, so there is no
app compat concern.
Bug: N/A (though noticed in development of b/238777741)
Test: binderLibTest
Change-Id: Id31ac631b929350b97ab865c720f1dc1dfa26d2b
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp
index b5ea60f..5a611a2 100644
--- a/libs/binder/Binder.cpp
+++ b/libs/binder/Binder.cpp
@@ -272,11 +272,9 @@
const String16& BBinder::getInterfaceDescriptor() const
{
- // This is a local static rather than a global static,
- // to avoid static initializer ordering issues.
- static String16 sEmptyDescriptor;
- ALOGW("reached BBinder::getInterfaceDescriptor (this=%p)", this);
- return sEmptyDescriptor;
+ static StaticString16 sBBinder(u"BBinder");
+ ALOGW("Reached BBinder::getInterfaceDescriptor (this=%p). Override?", this);
+ return sBBinder;
}
// NOLINTNEXTLINE(google-default-arguments)