summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2020-02-18 16:38:43 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2020-02-18 16:38:43 +0000
commit2ac83618cab5dfb85b4fd39e2f50724aa3d491e0 (patch)
tree4a88bdc9fe18ed561e7ed7a744eba2b4ccf1e53e
parentdb5aceffb304ff23a210b7c2671b6becf3a5c773 (diff)
parentc40bba08aca8d81e890b4451b61c7d2c8078174a (diff)
Merge "Activate apexes in /system_ext/apex, /vendor/apex" am: 5f28d3c732 am: c40bba08ac
Change-Id: I74f81a69797ca04883e12dc17f9e56bdbf918881
-rw-r--r--cmds/installd/otapreopt_chroot.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/cmds/installd/otapreopt_chroot.cpp b/cmds/installd/otapreopt_chroot.cpp
index 7c989f6ced..6459805ba3 100644
--- a/cmds/installd/otapreopt_chroot.cpp
+++ b/cmds/installd/otapreopt_chroot.cpp
@@ -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).
- // Cast call to void to suppress warn_unused_result.
- static_cast<void>(apex::scanPackagesDirAndActivate(apex::kApexPackageSystemDir));
+ // 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(dir));
+ }
return apex::getActivePackages();
}