diff options
author | 2016-10-18 08:00:50 +0000 | |
---|---|---|
committer | 2016-10-18 08:00:50 +0000 | |
commit | 3d39a99d9a32bff636aa740b522e3bbc06189dfe (patch) | |
tree | b7d4ada8372161e3b1b073da7d7d79ad9b5657fc | |
parent | 74f34c04799433e2feb7a7cc48a01f3ff63f1599 (diff) | |
parent | 27471b30deaae5941480dd75f867c31576f7bc93 (diff) |
Search for RRO both in SKU subdir and in vendor/overlay am: 1f36a2166b
am: 27471b30de
Change-Id: I5c8655c5f9abe1375c0d53f48705709331d472d9
-rw-r--r-- | core/jni/android_util_AssetManager.cpp | 15 | ||||
-rw-r--r-- | include/androidfw/AssetManager.h | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp index 5a4348e478dd..6dd7a6a08d5d 100644 --- a/core/jni/android_util_AssetManager.cpp +++ b/core/jni/android_util_AssetManager.cpp @@ -186,18 +186,17 @@ static void verifySystemIdmaps() argv[argc++] = AssetManager::IDMAP_DIR; // Directories to scan for overlays: if OVERLAY_SKU_DIR_PROPERTY is defined, - // use OVERLAY_DIR/<value of OVERLAY_SKU_DIR_PROPERTY> if exists, otherwise - // use OVERLAY_DIR if exists. + // use OVERLAY_DIR/<value of OVERLAY_SKU_DIR_PROPERTY> in addition to OVERLAY_DIR. char subdir[PROP_VALUE_MAX]; int len = __system_property_get(AssetManager::OVERLAY_SKU_DIR_PROPERTY, subdir); - String8 overlayPath; if (len > 0) { - overlayPath = String8(AssetManager::OVERLAY_DIR) + "/" + subdir; - } else { - overlayPath = String8(AssetManager::OVERLAY_DIR); + String8 overlayPath = String8(AssetManager::OVERLAY_DIR) + "/" + subdir; + if (stat(overlayPath.string(), &st) == 0) { + argv[argc++] = overlayPath.string(); + } } - if (stat(overlayPath.string(), &st) == 0) { - argv[argc++] = overlayPath.string(); + if (stat(AssetManager::OVERLAY_DIR, &st) == 0) { + argv[argc++] = AssetManager::OVERLAY_DIR; } // Finally, invoke idmap (if any overlay directory exists) diff --git a/include/androidfw/AssetManager.h b/include/androidfw/AssetManager.h index 3b5cdcefd631..7aec3239e1c0 100644 --- a/include/androidfw/AssetManager.h +++ b/include/androidfw/AssetManager.h @@ -71,7 +71,7 @@ public: static const char* OVERLAY_DIR; /* * If OVERLAY_SKU_DIR_PROPERTY is set, search for runtime resource overlay - * APKs in OVERLAY_DIR/<value of OVERLAY_SKU_DIR_PROPERTY> rather than in + * APKs in OVERLAY_DIR/<value of OVERLAY_SKU_DIR_PROPERTY> in addition to * OVERLAY_DIR. */ static const char* OVERLAY_SKU_DIR_PROPERTY; |