Reland "binder: Use StaticString16 for interface descriptors"
This reverts commit 787d93d6bde750cf372c577586c34c3f115abd60.
Bug: 138856262
Test: Build success.
Change-Id: I304f8e03fe87571effc99fc438ed25a41e2150fe
diff --git a/libs/binder/include/binder/IInterface.h b/libs/binder/include/binder/IInterface.h
index 0d30560..adc1f05 100644
--- a/libs/binder/include/binder/IInterface.h
+++ b/libs/binder/include/binder/IInterface.h
@@ -88,8 +88,12 @@
public: \
+#define __IINTF_CONCAT(x, y) (x ## y)
#define IMPLEMENT_META_INTERFACE(INTERFACE, NAME) \
- const ::android::String16 I##INTERFACE::descriptor(NAME); \
+ const ::android::StaticString16 \
+ I##INTERFACE##_descriptor_static_str16(__IINTF_CONCAT(u, NAME));\
+ const ::android::String16 I##INTERFACE::descriptor( \
+ I##INTERFACE##_descriptor_static_str16); \
const ::android::String16& \
I##INTERFACE::getInterfaceDescriptor() const { \
return I##INTERFACE::descriptor; \