Rename registerServiceWithCallback

Rename registerServiceWithCallback to registerService. User cannot pass
a callback to registerServiceWithCallback, so its name is confusing.
Rename it to registerService. Because it is part of
LazyServiceRegistrar, it should be clear what this function does.

Test: Build and check that cas functions as a lazy hal as before
Change-Id: I766a413b5c85f3fba6b99cffd65aa1ec77d03764
diff --git a/transport/HidlLazyUtils.cpp b/transport/HidlLazyUtils.cpp
index f1dd08b..9223af6 100644
--- a/transport/HidlLazyUtils.cpp
+++ b/transport/HidlLazyUtils.cpp
@@ -52,8 +52,8 @@
    public:
     LazyServiceRegistrarImpl() : mClientCallback(new ClientCounterCallback) {}
 
-    status_t registerServiceWithCallback(const sp<::android::hidl::base::V1_0::IBase>& service,
-                                         const std::string& name);
+    status_t registerService(const sp<::android::hidl::base::V1_0::IBase>& service,
+                             const std::string& name);
 
    private:
     sp<ClientCounterCallback> mClientCallback;
@@ -86,7 +86,7 @@
     return Status::ok();
 }
 
-status_t LazyServiceRegistrarImpl::registerServiceWithCallback(
+status_t LazyServiceRegistrarImpl::registerService(
     const sp<::android::hidl::base::V1_0::IBase>& service, const std::string& name) {
     static auto manager = hardware::defaultServiceManager1_2();
     LOG(INFO) << "Registering HAL: " << service->descriptor << " with name: " << name;
@@ -110,9 +110,9 @@
     mImpl = std::make_shared<details::LazyServiceRegistrarImpl>();
 }
 
-status_t LazyServiceRegistrar::registerServiceWithCallback(
+status_t LazyServiceRegistrar::registerService(
     const sp<::android::hidl::base::V1_0::IBase>& service, const std::string& name) {
-    return mImpl->registerServiceWithCallback(service, name);
+    return mImpl->registerService(service, name);
 }
 
 }  // namespace hardware
diff --git a/transport/include/hidl/HidlLazyUtils.h b/transport/include/hidl/HidlLazyUtils.h
index 2161b7d..2205daa 100644
--- a/transport/include/hidl/HidlLazyUtils.h
+++ b/transport/include/hidl/HidlLazyUtils.h
@@ -30,8 +30,8 @@
 class LazyServiceRegistrar {
    public:
     LazyServiceRegistrar();
-    status_t registerServiceWithCallback(const sp<::android::hidl::base::V1_0::IBase>& service,
-                                         const std::string& name = "default");
+    status_t registerService(const sp<::android::hidl::base::V1_0::IBase>& service,
+                             const std::string& name = "default");
 
    private:
     std::shared_ptr<details::LazyServiceRegistrarImpl> mImpl;
diff --git a/transport/include/hidl/LegacySupport.h b/transport/include/hidl/LegacySupport.h
index d5b3ddb..1e983eb 100644
--- a/transport/include/hidl/LegacySupport.h
+++ b/transport/include/hidl/LegacySupport.h
@@ -110,7 +110,7 @@
 
     return details::registerPassthroughServiceImplementation<Interface>(
         [](const sp<Interface>& service, const std::string& name) {
-            return serviceCounter->registerServiceWithCallback(service, name);
+            return serviceCounter->registerService(service, name);
         },
         name);
 }