Merge "Support paths for vintf_fragments from Soong." am: 1552c7b178 am: 193651c2ae

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677041

Change-Id: I208b3a2483752b2914e0b838173b0b933c4a33a1
This commit is contained in:
Treehugger Robot 2021-04-22 17:21:00 +00:00 committed by Automerger Merge Worker
commit 0b77156774
3 changed files with 6 additions and 4 deletions

View File

@ -550,7 +550,9 @@ func (a *AndroidMkEntries) fillInEntries(ctx fillInEntriesContext, mod blueprint
if !amod.InRamdisk() && !amod.InVendorRamdisk() {
a.AddPaths("LOCAL_FULL_INIT_RC", amod.initRcPaths)
}
a.AddStrings("LOCAL_VINTF_FRAGMENTS", amod.commonProperties.Vintf_fragments...)
if len(amod.vintfFragmentsPaths) > 0 {
a.AddPaths("LOCAL_FULL_VINTF_FRAGMENTS", amod.vintfFragmentsPaths)
}
a.SetBoolIfTrue("LOCAL_PROPRIETARY_MODULE", Bool(amod.commonProperties.Proprietary))
if Bool(amod.commonProperties.Vendor) || Bool(amod.commonProperties.Soc_specific) {
a.SetString("LOCAL_VENDOR_MODULE", "true")

View File

@ -284,7 +284,7 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, mo
// To install companion files (init_rc, vintf_fragments)
// Copy some common properties of apexBundle to apex_manifest
commonProperties := []string{
"LOCAL_FULL_INIT_RC", "LOCAL_VINTF_FRAGMENTS",
"LOCAL_FULL_INIT_RC", "LOCAL_FULL_VINTF_FRAGMENTS",
}
for _, name := range commonProperties {
if value, ok := apexAndroidMkData.Entries.EntryMap[name]; ok {
@ -394,7 +394,7 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData {
// Because apex writes .mk with Custom(), we need to write manually some common properties
// which are available via data.Entries
commonProperties := []string{
"LOCAL_FULL_INIT_RC", "LOCAL_VINTF_FRAGMENTS",
"LOCAL_FULL_INIT_RC", "LOCAL_FULL_VINTF_FRAGMENTS",
"LOCAL_PROPRIETARY_MODULE", "LOCAL_VENDOR_MODULE", "LOCAL_ODM_MODULE", "LOCAL_PRODUCT_MODULE", "LOCAL_SYSTEM_EXT_MODULE",
"LOCAL_MODULE_OWNER",
}

View File

@ -2755,7 +2755,7 @@ func TestAndroidMkWritesCommonProperties(t *testing.T) {
var builder strings.Builder
data.Custom(&builder, name, prefix, "", data)
androidMk := builder.String()
ensureContains(t, androidMk, "LOCAL_VINTF_FRAGMENTS := fragment.xml\n")
ensureContains(t, androidMk, "LOCAL_FULL_VINTF_FRAGMENTS := fragment.xml\n")
ensureContains(t, androidMk, "LOCAL_FULL_INIT_RC := init.rc\n")
}