NoHwServiceManager pretend like IServiceManager is registered am: 0d30917a34
Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/2847956
Change-Id: I8a18764a3c6701fd31d18b34f6122f61e4c81361
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index 8c9bc5b..a759c50 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -252,6 +252,12 @@
}
Return<Transport> getTransport(const hidl_string& fqName, const hidl_string& name) {
+ // We pretend like IServiceManager is declared for
+ // IServiceManager::getService to return this NoHwServiceManager
+ // instance
+ if (isServiceManager(fqName)) {
+ return Transport::HWBINDER;
+ }
LOG(INFO) << "Trying to get transport of " << fqName << "/" << name
<< " without hwservicemanager";
return Transport::EMPTY;