Use product instead of oem for Product specific module am: 5cfbfbb67a am: 2b6236308b

am: be16d5e84f

Change-Id: I6ee908710e7d7b7fe9d3ce7e6c43287e3e8c0835
This commit is contained in:
Jaekyun Seok
2018-01-25 04:17:04 +00:00
committed by android-build-merger
7 changed files with 18 additions and 18 deletions

View File

@@ -237,7 +237,7 @@ func translateAndroidMkModule(ctx SingletonContext, w io.Writer, mod blueprint.M
fmt.Fprintln(&data.preamble, "LOCAL_ODM_MODULE := true") fmt.Fprintln(&data.preamble, "LOCAL_ODM_MODULE := true")
} }
if Bool(amod.commonProperties.Product_specific) { if Bool(amod.commonProperties.Product_specific) {
fmt.Fprintln(&data.preamble, "LOCAL_OEM_MODULE := true") fmt.Fprintln(&data.preamble, "LOCAL_PRODUCT_MODULE := true")
} }
if amod.commonProperties.Owner != nil { if amod.commonProperties.Owner != nil {
fmt.Fprintln(&data.preamble, "LOCAL_MODULE_OWNER :=", *amod.commonProperties.Owner) fmt.Fprintln(&data.preamble, "LOCAL_MODULE_OWNER :=", *amod.commonProperties.Owner)

View File

@@ -676,11 +676,11 @@ func (c *deviceConfig) OdmPath() string {
return "odm" return "odm"
} }
func (c *deviceConfig) OemPath() string { func (c *deviceConfig) ProductPath() string {
if c.config.ProductVariables.OemPath != nil { if c.config.ProductVariables.ProductPath != nil {
return *c.config.ProductVariables.OemPath return *c.config.ProductVariables.ProductPath
} }
return "oem" return "product"
} }
func (c *deviceConfig) BtConfigIncludeDir() string { func (c *deviceConfig) BtConfigIncludeDir() string {

View File

@@ -232,8 +232,8 @@ type commonProperties struct {
Device_specific *bool Device_specific *bool
// whether this module is specific to a software configuration of a product (e.g. country, // whether this module is specific to a software configuration of a product (e.g. country,
// network operator, etc). When set to true, it is installed into /oem (or /system/oem if // network operator, etc). When set to true, it is installed into /product (or
// oem partition does not exist). // /system/product if product partition does not exist).
Product_specific *bool Product_specific *bool
// init.rc files to be installed if this module is installed // init.rc files to be installed if this module is installed

View File

@@ -850,7 +850,7 @@ func PathForModuleInstall(ctx ModuleInstallPathContext, pathComponents ...string
} else if ctx.DeviceSpecific() { } else if ctx.DeviceSpecific() {
partition = ctx.DeviceConfig().OdmPath() partition = ctx.DeviceConfig().OdmPath()
} else if ctx.ProductSpecific() { } else if ctx.ProductSpecific() {
partition = ctx.DeviceConfig().OemPath() partition = ctx.DeviceConfig().ProductPath()
} else { } else {
partition = "system" partition = "system"
} }

View File

@@ -264,7 +264,7 @@ func TestPathForModuleInstall(t *testing.T) {
out: "target/product/test_device/odm/bin/my_test", out: "target/product/test_device/odm/bin/my_test",
}, },
{ {
name: "oem binary", name: "product binary",
ctx: &moduleInstallPathContextImpl{ ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{ androidBaseContextImpl: androidBaseContextImpl{
target: deviceTarget, target: deviceTarget,
@@ -272,7 +272,7 @@ func TestPathForModuleInstall(t *testing.T) {
}, },
}, },
in: []string{"bin", "my_test"}, in: []string{"bin", "my_test"},
out: "target/product/test_device/oem/bin/my_test", out: "target/product/test_device/product/bin/my_test",
}, },
{ {
@@ -311,7 +311,7 @@ func TestPathForModuleInstall(t *testing.T) {
out: "target/product/test_device/data/nativetest/my_test", out: "target/product/test_device/data/nativetest/my_test",
}, },
{ {
name: "oem native test binary", name: "product native test binary",
ctx: &moduleInstallPathContextImpl{ ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{ androidBaseContextImpl: androidBaseContextImpl{
target: deviceTarget, target: deviceTarget,
@@ -359,7 +359,7 @@ func TestPathForModuleInstall(t *testing.T) {
out: "target/product/test_device/data/asan/odm/bin/my_test", out: "target/product/test_device/data/asan/odm/bin/my_test",
}, },
{ {
name: "sanitized oem binary", name: "sanitized product binary",
ctx: &moduleInstallPathContextImpl{ ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{ androidBaseContextImpl: androidBaseContextImpl{
target: deviceTarget, target: deviceTarget,
@@ -368,7 +368,7 @@ func TestPathForModuleInstall(t *testing.T) {
inSanitizerDir: true, inSanitizerDir: true,
}, },
in: []string{"bin", "my_test"}, in: []string{"bin", "my_test"},
out: "target/product/test_device/data/asan/oem/bin/my_test", out: "target/product/test_device/data/asan/product/bin/my_test",
}, },
{ {
@@ -410,7 +410,7 @@ func TestPathForModuleInstall(t *testing.T) {
out: "target/product/test_device/data/asan/data/nativetest/my_test", out: "target/product/test_device/data/asan/data/nativetest/my_test",
}, },
{ {
name: "sanitized oem native test binary", name: "sanitized product native test binary",
ctx: &moduleInstallPathContextImpl{ ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{ androidBaseContextImpl: androidBaseContextImpl{
target: deviceTarget, target: deviceTarget,

View File

@@ -184,9 +184,9 @@ type productVariables struct {
CFIExcludePaths *[]string `json:",omitempty"` CFIExcludePaths *[]string `json:",omitempty"`
CFIIncludePaths *[]string `json:",omitempty"` CFIIncludePaths *[]string `json:",omitempty"`
VendorPath *string `json:",omitempty"` VendorPath *string `json:",omitempty"`
OdmPath *string `json:",omitempty"` OdmPath *string `json:",omitempty"`
OemPath *string `json:",omitempty"` ProductPath *string `json:",omitempty"`
ClangTidy *bool `json:",omitempty"` ClangTidy *bool `json:",omitempty"`
TidyChecks *string `json:",omitempty"` TidyChecks *string `json:",omitempty"`

View File

@@ -158,7 +158,7 @@ func init() {
"LOCAL_PROPRIETARY_MODULE": "proprietary", "LOCAL_PROPRIETARY_MODULE": "proprietary",
"LOCAL_VENDOR_MODULE": "vendor", "LOCAL_VENDOR_MODULE": "vendor",
"LOCAL_ODM_MODULE": "device_specific", "LOCAL_ODM_MODULE": "device_specific",
"LOCAL_OEM_MODULE": "product_specific", "LOCAL_PRODUCT_MODULE": "product_specific",
"LOCAL_EXPORT_PACKAGE_RESOURCES": "export_package_resources", "LOCAL_EXPORT_PACKAGE_RESOURCES": "export_package_resources",
"LOCAL_PRIVILEGED_MODULE": "privileged", "LOCAL_PRIVILEGED_MODULE": "privileged",