Merge "SystemConfig: Allow runtime differentiation of vendor configurations" into rvc-dev am: 02e00a379b am: e0ec3cbcb1
Change-Id: I903ac0d9d77f77ab34dc9b846c8d684917d8b510
This commit is contained in:
@@ -82,6 +82,9 @@ public class SystemConfig {
|
|||||||
// property for runtime configuration differentiation
|
// property for runtime configuration differentiation
|
||||||
private static final String SKU_PROPERTY = "ro.boot.product.hardware.sku";
|
private static final String SKU_PROPERTY = "ro.boot.product.hardware.sku";
|
||||||
|
|
||||||
|
// property for runtime configuration differentiation in vendor
|
||||||
|
private static final String VENDOR_SKU_PROPERTY = "ro.boot.product.vendor.sku";
|
||||||
|
|
||||||
// Group-ids that are given to all packages as read from etc/permissions/*.xml.
|
// Group-ids that are given to all packages as read from etc/permissions/*.xml.
|
||||||
int[] mGlobalGids;
|
int[] mGlobalGids;
|
||||||
|
|
||||||
@@ -468,6 +471,17 @@ public class SystemConfig {
|
|||||||
readPermissions(Environment.buildPath(
|
readPermissions(Environment.buildPath(
|
||||||
Environment.getVendorDirectory(), "etc", "permissions"), vendorPermissionFlag);
|
Environment.getVendorDirectory(), "etc", "permissions"), vendorPermissionFlag);
|
||||||
|
|
||||||
|
String vendorSkuProperty = SystemProperties.get(VENDOR_SKU_PROPERTY, "");
|
||||||
|
if (!vendorSkuProperty.isEmpty()) {
|
||||||
|
String vendorSkuDir = "sku_" + vendorSkuProperty;
|
||||||
|
readPermissions(Environment.buildPath(
|
||||||
|
Environment.getVendorDirectory(), "etc", "sysconfig", vendorSkuDir),
|
||||||
|
vendorPermissionFlag);
|
||||||
|
readPermissions(Environment.buildPath(
|
||||||
|
Environment.getVendorDirectory(), "etc", "permissions", vendorSkuDir),
|
||||||
|
vendorPermissionFlag);
|
||||||
|
}
|
||||||
|
|
||||||
// Allow ODM to customize system configs as much as Vendor, because /odm is another
|
// Allow ODM to customize system configs as much as Vendor, because /odm is another
|
||||||
// vendor partition other than /vendor.
|
// vendor partition other than /vendor.
|
||||||
int odmPermissionFlag = vendorPermissionFlag;
|
int odmPermissionFlag = vendorPermissionFlag;
|
||||||
|
|||||||
Reference in New Issue
Block a user