Loading init/apex_init_util.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -81,16 +81,13 @@ static Result<void> ParseConfigs(const std::vector<std::string>& configs) { } Result<void> ParseApexConfigs(const std::string& apex_name) { Result<std::vector<std::string>> configs = CollectApexConfigs(apex_name); if (!configs.ok()) { return configs.error(); } auto configs = OR_RETURN(CollectApexConfigs(apex_name)); if (configs.value().empty()) { if (configs.empty()) { return {}; } auto filtered_configs = FilterVersionedConfigs(configs.value(), auto filtered_configs = FilterVersionedConfigs(configs, android::base::GetIntProperty("ro.build.version.sdk", INT_MAX)); return ParseConfigs(filtered_configs); } Loading init/init.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -490,7 +490,6 @@ static Result<void> DoUnloadApex(const std::string& apex_name) { return Error() << "Unable to stop all service from " << apex_name; } RemoveServiceAndActionFromApex(apex_name); SetProperty("init.apex." + apex_name, "unloaded"); return {}; } Loading Loading @@ -522,7 +521,6 @@ static Result<void> DoLoadApex(const std::string& apex_name) { return result.error(); } SetProperty("init.apex." + apex_name, "loaded"); return {}; } Loading init/init_test.cpp +0 −14 Original line number Diff line number Diff line Loading @@ -535,20 +535,6 @@ TEST(init, LazilyLoadedActionsCanBeTriggeredByTheNextTrigger) { EXPECT_EQ(2, num_executed); } TEST(init, RespondToCtlApexMessages) { if (getuid() != 0) { GTEST_SKIP() << "Skipping test, must be run as root."; return; } std::string apex_name = "com.android.apex.cts.shim"; SetProperty("ctl.apex_unload", apex_name); EXPECT_TRUE(WaitForProperty("init.apex." + apex_name, "unloaded", 10s)); SetProperty("ctl.apex_load", apex_name); EXPECT_TRUE(WaitForProperty("init.apex." + apex_name, "loaded", 10s)); } TEST(init, RejectsCriticalAndOneshotService) { if (GetIntProperty("ro.product.first_api_level", 10000) < 30) { GTEST_SKIP() << "Test only valid for devices launching with R or later"; Loading Loading
init/apex_init_util.cpp +3 −6 Original line number Diff line number Diff line Loading @@ -81,16 +81,13 @@ static Result<void> ParseConfigs(const std::vector<std::string>& configs) { } Result<void> ParseApexConfigs(const std::string& apex_name) { Result<std::vector<std::string>> configs = CollectApexConfigs(apex_name); if (!configs.ok()) { return configs.error(); } auto configs = OR_RETURN(CollectApexConfigs(apex_name)); if (configs.value().empty()) { if (configs.empty()) { return {}; } auto filtered_configs = FilterVersionedConfigs(configs.value(), auto filtered_configs = FilterVersionedConfigs(configs, android::base::GetIntProperty("ro.build.version.sdk", INT_MAX)); return ParseConfigs(filtered_configs); } Loading
init/init.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -490,7 +490,6 @@ static Result<void> DoUnloadApex(const std::string& apex_name) { return Error() << "Unable to stop all service from " << apex_name; } RemoveServiceAndActionFromApex(apex_name); SetProperty("init.apex." + apex_name, "unloaded"); return {}; } Loading Loading @@ -522,7 +521,6 @@ static Result<void> DoLoadApex(const std::string& apex_name) { return result.error(); } SetProperty("init.apex." + apex_name, "loaded"); return {}; } Loading
init/init_test.cpp +0 −14 Original line number Diff line number Diff line Loading @@ -535,20 +535,6 @@ TEST(init, LazilyLoadedActionsCanBeTriggeredByTheNextTrigger) { EXPECT_EQ(2, num_executed); } TEST(init, RespondToCtlApexMessages) { if (getuid() != 0) { GTEST_SKIP() << "Skipping test, must be run as root."; return; } std::string apex_name = "com.android.apex.cts.shim"; SetProperty("ctl.apex_unload", apex_name); EXPECT_TRUE(WaitForProperty("init.apex." + apex_name, "unloaded", 10s)); SetProperty("ctl.apex_load", apex_name); EXPECT_TRUE(WaitForProperty("init.apex." + apex_name, "loaded", 10s)); } TEST(init, RejectsCriticalAndOneshotService) { if (GetIntProperty("ro.product.first_api_level", 10000) < 30) { GTEST_SKIP() << "Test only valid for devices launching with R or later"; Loading