init: rename ServiceManager to ServiceList and clean it up
ServiceManager is essentially just a list now that the rest of its
functionality has been moved elsewhere, so the class is renamed
appropriately.
The ServiceList::Find* functions have been cleaned up into a single
smaller interface.
The ServiceList::ForEach functions have been removed in favor of
ServiceList itself being directly iterable.
Test: boot bullhead
Change-Id: Ibd57c103338f03b83d81e8b48ea0e46cd48fd8f0
diff --git a/init/signal_handler.cpp b/init/signal_handler.cpp
index d77a212..9e49c48 100644
--- a/init/signal_handler.cpp
+++ b/init/signal_handler.cpp
@@ -62,7 +62,7 @@
if (PropertyChildReap(pid)) return true;
- Service* service = ServiceManager::GetInstance().FindServiceByPid(pid);
+ Service* service = ServiceList::GetInstance().FindService(pid, &Service::pid);
std::string name;
std::string wait_string;
@@ -90,7 +90,7 @@
service->Reap();
if (service->flags() & SVC_TEMPORARY) {
- ServiceManager::GetInstance().RemoveService(*service);
+ ServiceList::GetInstance().RemoveService(*service);
}
return true;