summaryrefslogtreecommitdiff
path: root/libartbase/base/file_utils.cc
diff options
context:
space:
mode:
author Chris Gross <chrisgross@google.com> 2020-04-24 09:36:45 -0700
committer Chris Gross <chrisgross@google.com> 2020-05-05 21:12:37 +0000
commit5477b8e55f01a58fac188f272818b38a19c50d4e (patch)
treee6e345925412d7bd3f6f1e46d9c47833c23bdb40 /libartbase/base/file_utils.cc
parented2895678203365b2024c742f51d34791729900b (diff)
Allow bootjars in system_ext.
Bug: 148385042 Test: Built and booted Pixel 3a both with and without a boot jar in system_ext. Test: m test-art-host-gtest-hidden_api_test32 Test: m test-art-host-gtest-hidden_api_test64 Change-Id: I10ef0340b92aa60579ff39f888cb556dc2953f2a
Diffstat (limited to 'libartbase/base/file_utils.cc')
-rw-r--r--libartbase/base/file_utils.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libartbase/base/file_utils.cc b/libartbase/base/file_utils.cc
index 98b69f3df5..91cf5f72b1 100644
--- a/libartbase/base/file_utils.cc
+++ b/libartbase/base/file_utils.cc
@@ -68,6 +68,8 @@ static constexpr const char* kClassesDex = "classes.dex";
static constexpr const char* kApexDefaultPath = "/apex/";
static constexpr const char* kAndroidRootEnvVar = "ANDROID_ROOT";
static constexpr const char* kAndroidRootDefaultPath = "/system";
+static constexpr const char* kAndroidSystemExtRootEnvVar = "ANDROID_SYSTEM_EXT";
+static constexpr const char* kAndroidSystemExtRootDefaultPath = "/system_ext";
static constexpr const char* kAndroidDataEnvVar = "ANDROID_DATA";
static constexpr const char* kAndroidDataDefaultPath = "/data";
static constexpr const char* kAndroidArtRootEnvVar = "ANDROID_ART_ROOT";
@@ -448,6 +450,13 @@ bool LocationIsOnSystemFramework(const char* full_path) {
/* subdir= */ "framework/");
}
+bool LocationIsOnSystemExtFramework(const char* full_path) {
+ return IsLocationOnModule(full_path,
+ kAndroidSystemExtRootEnvVar,
+ kAndroidSystemExtRootDefaultPath,
+ /* subdir= */ "framework/");
+}
+
bool LocationIsOnConscryptModule(const char* full_path) {
return IsLocationOnModule(
full_path, kAndroidConscryptRootEnvVar, kAndroidConscryptApexDefaultPath);