Fix potential use-after-free bug in reboot
Instead of operating on raw pointers, init now uses name of the
services as it's primary identifier. Only place that still uses
vector<Service*> is StopServices.
In addition, ServiceList::services() function is removed, which should
help avoiding similar bugs in the future.
Test: adb reboot
Test: atest CtsInitTestCases
(cherry picked from commit bbba64826fdfb7be1f04b7bbb125fbe6d25e5028)
4 files changed