Make LazyServiceRegistrar constructor private
This completes converting LazyServiceRegistrar into a singleton.
Test: lshal
Bug: 139376253
Change-Id: I3128921e0bc6674dc8bdce23380c86742f732bb4
diff --git a/transport/include/hidl/HidlLazyUtils.h b/transport/include/hidl/HidlLazyUtils.h
index 257de98..6a62c97 100644
--- a/transport/include/hidl/HidlLazyUtils.h
+++ b/transport/include/hidl/HidlLazyUtils.h
@@ -29,13 +29,13 @@
/** Exits when all HALs registered through this object have 0 clients */
class LazyServiceRegistrar {
public:
- LazyServiceRegistrar();
static LazyServiceRegistrar& getInstance();
status_t registerService(const sp<::android::hidl::base::V1_0::IBase>& service,
const std::string& name = "default");
private:
std::shared_ptr<details::LazyServiceRegistrarImpl> mImpl;
+ LazyServiceRegistrar();
};
} // namespace hardware