diff options
Diffstat (limited to 'libnativeloader/library_namespaces.cpp')
-rw-r--r-- | libnativeloader/library_namespaces.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libnativeloader/library_namespaces.cpp b/libnativeloader/library_namespaces.cpp index e2b27294f9..bd186c122a 100644 --- a/libnativeloader/library_namespaces.cpp +++ b/libnativeloader/library_namespaces.cpp @@ -85,6 +85,7 @@ constexpr const char* kProductLibPath = "/product/" LIB ":/system/product/" LIB; const std::regex kVendorPathRegex("(/system)?/vendor/.*"); const std::regex kProductPathRegex("(/system)?/product/.*"); +const std::regex kSystemPathRegex("/system(_ext)?/.*"); // MUST be tested last. jobject GetParentClassLoader(JNIEnv* env, jobject class_loader) { jclass class_loader_class = env->FindClass("java/lang/ClassLoader"); @@ -103,6 +104,9 @@ ApiDomain GetApiDomainFromPath(const std::string_view path) { if (is_product_treblelized() && std::regex_match(path.begin(), path.end(), kProductPathRegex)) { return API_DOMAIN_PRODUCT; } + if (std::regex_match(path.begin(), path.end(), kSystemPathRegex)) { + return API_DOMAIN_SYSTEM; + } return API_DOMAIN_DEFAULT; } |