From 1ef0eb669232a5b98db284d43ccd8287f3d7153a Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Thu, 18 Aug 2022 20:09:30 +0000 Subject: 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 --- libs/binder/Binder.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libs') diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp index b5ea60f102..5a611a23d3 100644 --- a/libs/binder/Binder.cpp +++ b/libs/binder/Binder.cpp @@ -272,11 +272,9 @@ status_t BBinder::pingBinder() 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) -- cgit v1.2.3-59-g8ed1b