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

Commit 2ac83618 authored by Treehugger Robot's avatar Treehugger Robot
Browse files

Merge "Activate apexes in /system_ext/apex, /vendor/apex" am: 5f28d3c7 am: c40bba08

Change-Id: I74f81a69797ca04883e12dc17f9e56bdbf918881
parents db5aceff c40bba08
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -61,11 +61,15 @@ static void CloseDescriptor(const char* descriptor_string) {

static std::vector<apex::ApexFile> ActivateApexPackages() {
    // The logic here is (partially) copied and adapted from
    // system/apex/apexd/apexd_main.cpp.
    // system/apex/apexd/apexd.cpp.
    //
    // Only scan the APEX directory under /system (within the chroot dir).
    // Only scan the APEX directory under /system, /system_ext and /vendor (within the chroot dir).
    std::vector<const char*> apex_dirs{apex::kApexPackageSystemDir, apex::kApexPackageSystemExtDir,
                                       apex::kApexPackageVendorDir};
    for (const auto& dir : apex_dirs) {
        // Cast call to void to suppress warn_unused_result.
    static_cast<void>(apex::scanPackagesDirAndActivate(apex::kApexPackageSystemDir));
        static_cast<void>(apex::scanPackagesDirAndActivate(dir));
    }
    return apex::getActivePackages();
}