summaryrefslogtreecommitdiff
path: root/core/jni/fd_utils.cpp
diff options
context:
space:
mode:
authorMÃ¥rten Kongstad <marten.kongstad@sony.com>2019-02-25 14:18:17 +0100
committerTodd Kennedy <toddke@google.com>2019-04-09 06:37:33 -0700
commiteb8a5c0b915683d9df54112a7345106b1eb762fe (patch)
treebf0663ca68bca2204c2f68de7dcd3885d0fa82e1 /core/jni/fd_utils.cpp
parentdd07ae579c291a2b6ffe09bd576fd908eb9e5ddd (diff)
Add support for /oem/overlay
Add support for runtime resource overlay (RRO) APKs in /oem/overlay. Bug: 121033532 Test: manual (adb push apk to /oem/overlay, reboot, cmd overlay list) Change-Id: I70b23b11831d57b3241e6057c745aa4ce9f795ef
Diffstat (limited to 'core/jni/fd_utils.cpp')
-rw-r--r--core/jni/fd_utils.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp
index 099635246f05..59732d71778c 100644
--- a/core/jni/fd_utils.cpp
+++ b/core/jni/fd_utils.cpp
@@ -104,6 +104,8 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
static const char* kProductServicesOverlayDir = "/product_services/overlay";
static const char* kSystemOdmOverlayDir = "/system/odm/overlay";
static const char* kOdmOverlayDir = "/odm/overlay";
+ static const char* kSystemOemOverlayDir = "/system/oem/overlay";
+ static const char* kOemOverlayDir = "/oem/overlay";
static const char* kApkSuffix = ".apk";
if ((android::base::StartsWith(path, kOverlayDir)
@@ -114,7 +116,9 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
|| android::base::StartsWith(path, kSystemProductServicesOverlayDir)
|| android::base::StartsWith(path, kProductServicesOverlayDir)
|| android::base::StartsWith(path, kSystemOdmOverlayDir)
- || android::base::StartsWith(path, kOdmOverlayDir))
+ || android::base::StartsWith(path, kOdmOverlayDir)
+ || android::base::StartsWith(path, kSystemOemOverlayDir)
+ || android::base::StartsWith(path, kOemOverlayDir))
&& android::base::EndsWith(path, kApkSuffix)
&& path.find("/../") == std::string::npos) {
return true;