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/HidlTransportSupport.h b/transport/include/hidl/HidlTransportSupport.h
index 4c9a881..730727c 100644
--- a/transport/include/hidl/HidlTransportSupport.h
+++ b/transport/include/hidl/HidlTransportSupport.h
@@ -22,6 +22,7 @@
 #include <hidl/HidlPassthroughSupport.h>
 #include <hidl/HidlSupport.h>
 #include <hidl/HidlTransportUtils.h>
+#include <hidl/ServiceManagement.h>
 
 namespace android {
 namespace hardware {
@@ -111,16 +112,6 @@
     return sp<IChild>(static_cast<IChild *>(parent.get()));
 }
 
-// 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);
-
 template <typename BpType, typename IType = typename BpType::Pure,
           typename = std::enable_if_t<std::is_same<i_tag, typename IType::_hidl_tag>::value>,
           typename = std::enable_if_t<std::is_same<bphw_tag, typename BpType::_hidl_tag>::value>>
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