Loading libs/binder/LazyServiceRegistrar.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,10 @@ LazyServiceRegistrar& LazyServiceRegistrar::getInstance() { return *registrarInstance; } LazyServiceRegistrar LazyServiceRegistrar::createExtraTestInstance() { return LazyServiceRegistrar(); } status_t LazyServiceRegistrar::registerService(const sp<IBinder>& service, const std::string& name, bool allowIsolated, int dumpFlags) { if (!mClientCC->registerService(service, name, allowIsolated, dumpFlags)) { Loading libs/binder/include/binder/LazyServiceRegistrar.h +11 −1 Original line number Diff line number Diff line Loading @@ -93,6 +93,16 @@ class LazyServiceRegistrar { */ void reRegister(); /** * Create a second instance of lazy service registrar. * * WARNING: dangerous! DO NOT USE THIS - LazyServiceRegistrar * should be single-instanced, so that the service will only * shut down when all services are unused. A separate instance * is only used to test race conditions. */ static LazyServiceRegistrar createExtraTestInstance(); private: std::shared_ptr<internal::ClientCounterCallback> mClientCC; LazyServiceRegistrar(); Loading Loading
libs/binder/LazyServiceRegistrar.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -324,6 +324,10 @@ LazyServiceRegistrar& LazyServiceRegistrar::getInstance() { return *registrarInstance; } LazyServiceRegistrar LazyServiceRegistrar::createExtraTestInstance() { return LazyServiceRegistrar(); } status_t LazyServiceRegistrar::registerService(const sp<IBinder>& service, const std::string& name, bool allowIsolated, int dumpFlags) { if (!mClientCC->registerService(service, name, allowIsolated, dumpFlags)) { Loading
libs/binder/include/binder/LazyServiceRegistrar.h +11 −1 Original line number Diff line number Diff line Loading @@ -93,6 +93,16 @@ class LazyServiceRegistrar { */ void reRegister(); /** * Create a second instance of lazy service registrar. * * WARNING: dangerous! DO NOT USE THIS - LazyServiceRegistrar * should be single-instanced, so that the service will only * shut down when all services are unused. A separate instance * is only used to test race conditions. */ static LazyServiceRegistrar createExtraTestInstance(); private: std::shared_ptr<internal::ClientCounterCallback> mClientCC; LazyServiceRegistrar(); Loading