Change name of overlay subdir 'sku'->'theme'
The name 'sku' does not fit well as we recommend to use the same value for different SKUs if vendors wish to have the same colors on those SKUs. Bug: 32268656 Change-Id: Ib5e5a3386676453dafeb13a6a6bf91f81bb48a11
This commit is contained in:
@@ -186,10 +186,10 @@ static void verifySystemIdmaps()
|
|||||||
argv[argc++] = AssetManager::TARGET_APK_PATH;
|
argv[argc++] = AssetManager::TARGET_APK_PATH;
|
||||||
argv[argc++] = AssetManager::IDMAP_DIR;
|
argv[argc++] = AssetManager::IDMAP_DIR;
|
||||||
|
|
||||||
// Directories to scan for overlays: if OVERLAY_SKU_DIR_PROPERTY is defined,
|
// Directories to scan for overlays: if OVERLAY_THEME_DIR_PROPERTY is defined,
|
||||||
// use OVERLAY_DIR/<value of OVERLAY_SKU_DIR_PROPERTY> in addition to OVERLAY_DIR.
|
// use OVERLAY_DIR/<value of OVERLAY_THEME_DIR_PROPERTY> in addition to OVERLAY_DIR.
|
||||||
char subdir[PROP_VALUE_MAX];
|
char subdir[PROP_VALUE_MAX];
|
||||||
int len = __system_property_get(AssetManager::OVERLAY_SKU_DIR_PROPERTY, subdir);
|
int len = __system_property_get(AssetManager::OVERLAY_THEME_DIR_PROPERTY, subdir);
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
String8 overlayPath = String8(AssetManager::OVERLAY_DIR) + "/" + subdir;
|
String8 overlayPath = String8(AssetManager::OVERLAY_DIR) + "/" + subdir;
|
||||||
if (stat(overlayPath.string(), &st) == 0) {
|
if (stat(overlayPath.string(), &st) == 0) {
|
||||||
|
|||||||
@@ -73,11 +73,11 @@ public:
|
|||||||
static const char* IDMAP_BIN;
|
static const char* IDMAP_BIN;
|
||||||
static const char* OVERLAY_DIR;
|
static const char* OVERLAY_DIR;
|
||||||
/*
|
/*
|
||||||
* If OVERLAY_SKU_DIR_PROPERTY is set, search for runtime resource overlay
|
* If OVERLAY_THEME_DIR_PROPERTY is set, search for runtime resource overlay
|
||||||
* APKs in OVERLAY_DIR/<value of OVERLAY_SKU_DIR_PROPERTY> in addition to
|
* APKs in OVERLAY_DIR/<value of OVERLAY_THEME_DIR_PROPERTY> in addition to
|
||||||
* OVERLAY_DIR.
|
* OVERLAY_DIR.
|
||||||
*/
|
*/
|
||||||
static const char* OVERLAY_SKU_DIR_PROPERTY;
|
static const char* OVERLAY_THEME_DIR_PROPERTY;
|
||||||
static const char* TARGET_PACKAGE_NAME;
|
static const char* TARGET_PACKAGE_NAME;
|
||||||
static const char* TARGET_APK_PATH;
|
static const char* TARGET_APK_PATH;
|
||||||
static const char* IDMAP_DIR;
|
static const char* IDMAP_DIR;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ static volatile int32_t gCount = 0;
|
|||||||
const char* AssetManager::RESOURCES_FILENAME = "resources.arsc";
|
const char* AssetManager::RESOURCES_FILENAME = "resources.arsc";
|
||||||
const char* AssetManager::IDMAP_BIN = "/system/bin/idmap";
|
const char* AssetManager::IDMAP_BIN = "/system/bin/idmap";
|
||||||
const char* AssetManager::OVERLAY_DIR = "/vendor/overlay";
|
const char* AssetManager::OVERLAY_DIR = "/vendor/overlay";
|
||||||
const char* AssetManager::OVERLAY_SKU_DIR_PROPERTY = "ro.boot.vendor.overlay.sku";
|
const char* AssetManager::OVERLAY_THEME_DIR_PROPERTY = "ro.boot.vendor.overlay.theme";
|
||||||
const char* AssetManager::TARGET_PACKAGE_NAME = "android";
|
const char* AssetManager::TARGET_PACKAGE_NAME = "android";
|
||||||
const char* AssetManager::TARGET_APK_PATH = "/system/framework/framework-res.apk";
|
const char* AssetManager::TARGET_APK_PATH = "/system/framework/framework-res.apk";
|
||||||
const char* AssetManager::IDMAP_DIR = "/data/resource-cache";
|
const char* AssetManager::IDMAP_DIR = "/data/resource-cache";
|
||||||
|
|||||||
@@ -464,11 +464,11 @@ public class PackageManagerService extends IPackageManager.Stub {
|
|||||||
|
|
||||||
private static final String VENDOR_OVERLAY_DIR = "/vendor/overlay";
|
private static final String VENDOR_OVERLAY_DIR = "/vendor/overlay";
|
||||||
/**
|
/**
|
||||||
* If VENDOR_OVERLAY_SKU_PROPERTY is set, search for runtime resource overlay APKs also in
|
* If VENDOR_OVERLAY_THEME_PROPERTY is set, search for runtime resource overlay APKs also in
|
||||||
* VENDOR_OVERLAY_DIR/<value of VENDOR_OVERLAY_SKU_PROPERTY> in addition to
|
* VENDOR_OVERLAY_DIR/<value of VENDOR_OVERLAY_THEME_PROPERTY> in addition to
|
||||||
* VENDOR_OVERLAY_DIR.
|
* VENDOR_OVERLAY_DIR.
|
||||||
*/
|
*/
|
||||||
private static final String VENDOR_OVERLAY_SKU_PROPERTY = "ro.boot.vendor.overlay.sku";
|
private static final String VENDOR_OVERLAY_THEME_PROPERTY = "ro.boot.vendor.overlay.theme";
|
||||||
|
|
||||||
private static int DEFAULT_EPHEMERAL_HASH_PREFIX_MASK = 0xFFFFF000;
|
private static int DEFAULT_EPHEMERAL_HASH_PREFIX_MASK = 0xFFFFF000;
|
||||||
private static int DEFAULT_EPHEMERAL_HASH_PREFIX_COUNT = 5;
|
private static int DEFAULT_EPHEMERAL_HASH_PREFIX_COUNT = 5;
|
||||||
@@ -2274,9 +2274,9 @@ public class PackageManagerService extends IPackageManager.Stub {
|
|||||||
// Collect vendor overlay packages. (Do this before scanning any apps.)
|
// Collect vendor overlay packages. (Do this before scanning any apps.)
|
||||||
// For security and version matching reason, only consider
|
// For security and version matching reason, only consider
|
||||||
// overlay packages if they reside in the right directory.
|
// overlay packages if they reside in the right directory.
|
||||||
String overlaySkuDir = SystemProperties.get(VENDOR_OVERLAY_SKU_PROPERTY);
|
String overlayThemeDir = SystemProperties.get(VENDOR_OVERLAY_THEME_PROPERTY);
|
||||||
if (!overlaySkuDir.isEmpty()) {
|
if (!overlayThemeDir.isEmpty()) {
|
||||||
scanDirTracedLI(new File(VENDOR_OVERLAY_DIR, overlaySkuDir), mDefParseFlags
|
scanDirTracedLI(new File(VENDOR_OVERLAY_DIR, overlayThemeDir), mDefParseFlags
|
||||||
| PackageParser.PARSE_IS_SYSTEM
|
| PackageParser.PARSE_IS_SYSTEM
|
||||||
| PackageParser.PARSE_IS_SYSTEM_DIR
|
| PackageParser.PARSE_IS_SYSTEM_DIR
|
||||||
| PackageParser.PARSE_TRUSTED_OVERLAY, scanFlags | SCAN_TRUSTED_OVERLAY, 0);
|
| PackageParser.PARSE_TRUSTED_OVERLAY, scanFlags | SCAN_TRUSTED_OVERLAY, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user