Move getRawServiceInternal to ServiceManagement.
For easier optimization in a follow-up CL.
Test: boot marlin, hidl_test, hidl_test_java
Bug: 67425500
Change-Id: I0ad6e970652ea3399f2e634ae0f81d6649411f89
diff --git a/transport/include/hidl/ServiceManagement.h b/transport/include/hidl/ServiceManagement.h
index d53cd7e..4df156b 100644
--- a/transport/include/hidl/ServiceManagement.h
+++ b/transport/include/hidl/ServiceManagement.h
@@ -18,6 +18,8 @@
#define ANDROID_HARDWARE_ISERVICE_MANAGER_H
#include <string>
+
+#include <android/hidl/base/1.0/IBase.h>
#include <utils/StrongPointer.h>
namespace android {
@@ -45,6 +47,16 @@
void waitForHwService(const std::string &interface, const std::string &instanceName);
void preloadPassthroughService(const std::string &descriptor);
+
+// Returns a service with the following constraints:
+// - retry => service is waited for and returned if available in this process
+// - getStub => internal only. Forces to get the unwrapped (no BsFoo) if available.
+// TODO(b/65843592)
+// If the service is a remote service, this function returns BpBase. If the service is
+// a passthrough service, this function returns the appropriately wrapped Bs child object.
+sp<::android::hidl::base::V1_0::IBase> getRawServiceInternal(const std::string& descriptor,
+ const std::string& instance,
+ bool retry, bool getStub);
};
// These functions are for internal use by hidl. If you want to get ahold