diff options
author | dianlujitao <dianlujitao@lineageos.org> | 2020-09-11 11:41:51 +0800 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-12-08 22:28:30 +0200 |
commit | 087b65eb3ab7909e21b99cc0ad8ec08f8f3325b4 (patch) | |
tree | 0e87da21b9bec919872880c4323036ef006d5222 | |
parent | 691b18193985b7480fb9380c8f2083c43d940890 (diff) |
soong: Make sure to preserve lineage product variables
Change-Id: Ice4093b86baed6974bab630f0e80f6b13a5e28f3
-rw-r--r-- | android/variable.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/android/variable.go b/android/variable.go index 3eb9e4087..de29ec21e 100644 --- a/android/variable.go +++ b/android/variable.go @@ -600,6 +600,11 @@ func createVariableProperties(moduleTypeProps []interface{}, productVariables in func createVariablePropertiesType(moduleTypeProps []interface{}, productVariables interface{}) reflect.Type { typ, _ := proptools.FilterPropertyStruct(reflect.TypeOf(productVariables), func(field reflect.StructField, prefix string) (bool, reflect.StructField) { + if strings.HasPrefix(prefix, "Product_variables.Lineage") { + // Convert Product_variables.Lineage.Foo to Lineage.Foo + _, prefix = splitPrefix(prefix) + } + // Filter function, returns true if the field should be in the resulting struct if prefix == "" { // Keep the top level Product_variables field |