Add IServiceManager addWithChain.

This prevents hwservicemanager from having to make oneway calls.

The method onRegistration will be deprecated after this as well.

Bug: 36424585
Test: hidl_test, boot
Change-Id: I05c8f86962da5f778dcf660d0adf598522ead282
diff --git a/transport/include/hidl/ServiceManagement.h b/transport/include/hidl/ServiceManagement.h
index 83b8c32..ce98f87 100644
--- a/transport/include/hidl/ServiceManagement.h
+++ b/transport/include/hidl/ServiceManagement.h
@@ -41,6 +41,7 @@
 namespace hardware {
 
 namespace details {
+// deprecated
 // e.x.: android.hardware.foo@1.0, IFoo, default
 void onRegistration(const std::string &packageName,
                     const std::string &interfaceName,
@@ -61,7 +62,10 @@
 sp<::android::hidl::base::V1_0::IBase> getRawServiceInternal(const std::string& descriptor,
                                                              const std::string& instance,
                                                              bool retry, bool getStub);
-}
+
+status_t registerAsServiceInternal(const sp<::android::hidl::base::V1_0::IBase>& service,
+                                   const std::string& name);
+}  // namespace details
 
 // These functions are for internal use by hidl. If you want to get ahold
 // of an interface, the best way to do this is by calling IFoo::getService()