Consider overlay in system_ext as system's
When there is overlay package in system_ext, turn on POLICY_SYSTEM_PARTITION.
In other words, overlay pacakge in /system_ext is considered as system's one
Test: mv vendor/overlay/framework-res__auto_generated_rro.apk system_ext/overlay
and then check if it works properly.
Bug: 136715327
Change-Id: Ib225368eae41203a8630f4310d26e9cf1afa706a
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index d6d9391..bf4ffc7 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -161,7 +161,7 @@
}
// Generic idmap parameters
- const char* argv[10];
+ const char* argv[11];
int argc = 0;
struct stat st;
@@ -193,8 +193,8 @@
argv[argc++] = AssetManager::PRODUCT_OVERLAY_DIR;
}
- if (stat(AssetManager::PRODUCT_SERVICES_OVERLAY_DIR, &st) == 0) {
- argv[argc++] = AssetManager::PRODUCT_SERVICES_OVERLAY_DIR;
+ if (stat(AssetManager::SYSTEM_EXT_OVERLAY_DIR, &st) == 0) {
+ argv[argc++] = AssetManager::SYSTEM_EXT_OVERLAY_DIR;
}
if (stat(AssetManager::ODM_OVERLAY_DIR, &st) == 0) {
@@ -235,8 +235,8 @@
input_dirs.push_back(AssetManager::PRODUCT_OVERLAY_DIR);
}
- if (stat(AssetManager::PRODUCT_SERVICES_OVERLAY_DIR, &st) == 0) {
- input_dirs.push_back(AssetManager::PRODUCT_SERVICES_OVERLAY_DIR);
+ if (stat(AssetManager::SYSTEM_EXT_OVERLAY_DIR, &st) == 0) {
+ input_dirs.push_back(AssetManager::SYSTEM_EXT_OVERLAY_DIR);
}
if (stat(AssetManager::ODM_OVERLAY_DIR, &st) == 0) {