Merge "Allow bootjars in system_ext." am: 6abe4fb0a7 am: 4ab8f542e9 am: ec82e99ca6 am: 1f3fa889d4

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

View File

@@ -85,11 +85,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.