Use product instead of oem for Product specific module
Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.
Change-Id: Icc4f8c16bc389fe20db680849f311d02df1299c3
diff --git a/android/androidmk.go b/android/androidmk.go
index 704b560..0ea7564 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -237,7 +237,7 @@
fmt.Fprintln(&data.preamble, "LOCAL_ODM_MODULE := true")
}
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 {
fmt.Fprintln(&data.preamble, "LOCAL_MODULE_OWNER :=", *amod.commonProperties.Owner)
diff --git a/android/config.go b/android/config.go
index 2ce7f48..b5ec975 100644
--- a/android/config.go
+++ b/android/config.go
@@ -676,11 +676,11 @@
return "odm"
}
-func (c *deviceConfig) OemPath() string {
- if c.config.ProductVariables.OemPath != nil {
- return *c.config.ProductVariables.OemPath
+func (c *deviceConfig) ProductPath() string {
+ if c.config.ProductVariables.ProductPath != nil {
+ return *c.config.ProductVariables.ProductPath
}
- return "oem"
+ return "product"
}
func (c *deviceConfig) BtConfigIncludeDir() string {
diff --git a/android/module.go b/android/module.go
index 0fb9479..14b9f41 100644
--- a/android/module.go
+++ b/android/module.go
@@ -232,8 +232,8 @@
Device_specific *bool
// 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
- // oem partition does not exist).
+ // network operator, etc). When set to true, it is installed into /product (or
+ // /system/product if product partition does not exist).
Product_specific *bool
// init.rc files to be installed if this module is installed
diff --git a/android/paths.go b/android/paths.go
index 4d9c858..e941e96 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -850,7 +850,7 @@
} else if ctx.DeviceSpecific() {
partition = ctx.DeviceConfig().OdmPath()
} else if ctx.ProductSpecific() {
- partition = ctx.DeviceConfig().OemPath()
+ partition = ctx.DeviceConfig().ProductPath()
} else {
partition = "system"
}
diff --git a/android/paths_test.go b/android/paths_test.go
index 110974f..61a172f 100644
--- a/android/paths_test.go
+++ b/android/paths_test.go
@@ -264,7 +264,7 @@
out: "target/product/test_device/odm/bin/my_test",
},
{
- name: "oem binary",
+ name: "product binary",
ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{
target: deviceTarget,
@@ -272,7 +272,7 @@
},
},
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 @@
out: "target/product/test_device/data/nativetest/my_test",
},
{
- name: "oem native test binary",
+ name: "product native test binary",
ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{
target: deviceTarget,
@@ -359,7 +359,7 @@
out: "target/product/test_device/data/asan/odm/bin/my_test",
},
{
- name: "sanitized oem binary",
+ name: "sanitized product binary",
ctx: &moduleInstallPathContextImpl{
androidBaseContextImpl: androidBaseContextImpl{
target: deviceTarget,
@@ -368,7 +368,7 @@
inSanitizerDir: true,
},
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 @@
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{
androidBaseContextImpl: androidBaseContextImpl{
target: deviceTarget,
diff --git a/android/variable.go b/android/variable.go
index 40fa45e..2c2a0cf 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -174,9 +174,9 @@
CFIExcludePaths *[]string `json:",omitempty"`
CFIIncludePaths *[]string `json:",omitempty"`
- VendorPath *string `json:",omitempty"`
- OdmPath *string `json:",omitempty"`
- OemPath *string `json:",omitempty"`
+ VendorPath *string `json:",omitempty"`
+ OdmPath *string `json:",omitempty"`
+ ProductPath *string `json:",omitempty"`
ClangTidy *bool `json:",omitempty"`
TidyChecks *string `json:",omitempty"`
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 123f4a9..960f103 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -158,7 +158,7 @@
"LOCAL_PROPRIETARY_MODULE": "proprietary",
"LOCAL_VENDOR_MODULE": "vendor",
"LOCAL_ODM_MODULE": "device_specific",
- "LOCAL_OEM_MODULE": "product_specific",
+ "LOCAL_PRODUCT_MODULE": "product_specific",
"LOCAL_EXPORT_PACKAGE_RESOURCES": "export_package_resources",
"LOCAL_PRIVILEGED_MODULE": "privileged",