registerReferences registers absolute subclass am: e69e8d3d3f
am: e3c521fd8d
Change-Id: Ifaf409f23ba7a7a15d6fdfcc75fcbf96131ad40e
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index dd6736f..edd2af3 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -30,6 +30,7 @@
#include <hidl/HidlBinderSupport.h>
#include <hidl/HidlInternal.h>
+#include <hidl/HidlTransportUtils.h>
#include <hidl/ServiceManagement.h>
#include <hidl/Status.h>
@@ -357,7 +358,12 @@
return true; // this module doesn't provide this instance name
}
- registerReference(fqName, name);
+ // Actual fqname might be a subclass.
+ // This assumption is tested in vts_treble_vintf_test
+ using ::android::hardware::details::getDescriptor;
+ std::string actualFqName = getDescriptor(ret.get());
+ CHECK(actualFqName.size() > 0);
+ registerReference(actualFqName, name);
return false;
});