aboutsummaryrefslogtreecommitdiff
path: root/android/product_config.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/product_config.go')
-rw-r--r--android/product_config.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/android/product_config.go b/android/product_config.go
index 850f00334..2549f7967 100644
--- a/android/product_config.go
+++ b/android/product_config.go
@@ -14,10 +14,6 @@
package android
-import (
- "github.com/google/blueprint/proptools"
-)
-
func init() {
ctx := InitRegistrationContext
ctx.RegisterModuleType("product_config", productConfigFactory)
@@ -27,6 +23,10 @@ type productConfigModule struct {
ModuleBase
}
+func (p *productConfigModule) UseGenericConfig() bool {
+ return false
+}
+
func (p *productConfigModule) GenerateAndroidBuildActions(ctx ModuleContext) {
if ctx.ModuleName() != "product_config" || ctx.ModuleDir() != "build/soong" {
ctx.ModuleErrorf("There can only be one product_config module in build/soong")
@@ -34,10 +34,10 @@ func (p *productConfigModule) GenerateAndroidBuildActions(ctx ModuleContext) {
}
outputFilePath := PathForModuleOut(ctx, p.Name()+".json")
- // DeviceProduct can be null so calling ctx.Config().DeviceProduct() may cause null dereference
- targetProduct := proptools.String(ctx.Config().config.productVariables.DeviceProduct)
- if targetProduct != "" {
- targetProduct += "."
+ // DeviceProduct can be null, so check before calling ctx.Config().DeviceProduct()
+ targetProduct := ""
+ if ctx.Config().HasDeviceProduct() {
+ targetProduct = ctx.Config().DeviceProduct() + "."
}
coverageSuffix := ctx.Config().CoverageSuffix()