Loading init/builtins.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,9 @@ static void ForEachServiceInClass(const std::string& classname, F function) { } static Result<Success> do_class_start(const BuiltinArguments& args) { // Do not start a class if it has a property persist.dont_start_class.CLASS set to 1. if (android::base::GetBoolProperty("persist.init.dont_start_class." + args[1], false)) return Success(); // Starting a class does not start services which are explicitly disabled. // They must be started individually. for (const auto& service : ServiceList::GetInstance()) { Loading @@ -124,6 +127,9 @@ static Result<Success> do_class_reset(const BuiltinArguments& args) { } static Result<Success> do_class_restart(const BuiltinArguments& args) { // Do not restart a class if it has a property persist.dont_start_class.CLASS set to 1. if (android::base::GetBoolProperty("persist.init.dont_start_class." + args[1], false)) return Success(); ForEachServiceInClass(args[1], &Service::Restart); return Success(); } Loading Loading
init/builtins.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,9 @@ static void ForEachServiceInClass(const std::string& classname, F function) { } static Result<Success> do_class_start(const BuiltinArguments& args) { // Do not start a class if it has a property persist.dont_start_class.CLASS set to 1. if (android::base::GetBoolProperty("persist.init.dont_start_class." + args[1], false)) return Success(); // Starting a class does not start services which are explicitly disabled. // They must be started individually. for (const auto& service : ServiceList::GetInstance()) { Loading @@ -124,6 +127,9 @@ static Result<Success> do_class_reset(const BuiltinArguments& args) { } static Result<Success> do_class_restart(const BuiltinArguments& args) { // Do not restart a class if it has a property persist.dont_start_class.CLASS set to 1. if (android::base::GetBoolProperty("persist.init.dont_start_class." + args[1], false)) return Success(); ForEachServiceInClass(args[1], &Service::Restart); return Success(); } Loading