Merge "Allow bootjars in system_ext." am: 6abe4fb0a7

Change-Id: Id56f3b2ed464de43b9b029c16e5f874019b6a88c
This commit is contained in:
Chris Gross
2020-05-05 21:15:42 +00:00
committed by Automerger Merge Worker

View File

@@ -81,11 +81,18 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
}
// Framework jars are allowed.
static const char* kFrameworksPrefix = "/system/framework/";
static const char* kFrameworksPrefix[] = {
"/system/framework/",
"/system_ext/framework/",
};
static const char* kJarSuffix = ".jar";
if (android::base::StartsWith(path, kFrameworksPrefix)
&& android::base::EndsWith(path, kJarSuffix)) {
return true;
for (const auto& frameworks_prefix : kFrameworksPrefix) {
if (android::base::StartsWith(path, frameworks_prefix)
&& android::base::EndsWith(path, kJarSuffix)) {
return true;
}
}
// Jars from the ART APEX are allowed.