Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c69bcd4a authored by Jooyung Han's avatar Jooyung Han Committed by Gerrit Code Review
Browse files

Merge "Removed property init.apex.<apex-name>.load/unload."

parents b1e4f98b 259b63d7
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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);
}
+0 −2
Original line number Diff line number Diff line
@@ -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 {};
}

@@ -522,7 +521,6 @@ static Result<void> DoLoadApex(const std::string& apex_name) {
        return result.error();
    }

    SetProperty("init.apex." + apex_name, "loaded");
    return {};
}

+0 −14
Original line number Diff line number Diff line
@@ -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";