Properly package aconfig files for product and system_ext partitions

Bug: 311173471
Test: Unit tests
Change-Id: Iac60695beb6529139965e4bb24024df6ce278fb2
This commit is contained in:
Yu Liu
2023-12-18 14:44:34 -08:00
parent 8070c4b457
commit 22e32f1b0b

View File

@@ -232,10 +232,16 @@ func mergeAconfigFiles(ctx android.ModuleContext, inputs android.Paths) android.
}
func SetAconfigFileMkEntries(m *android.ModuleBase, entries *android.AndroidMkEntries, aconfigFiles map[string]android.Paths) {
if m.InstallInVendor() {
entries.SetPaths("LOCAL_ACONFIG_FILES", aconfigFiles["vendor"])
} else {
// TODO(b/311155208): The container here should be system.
entries.SetPaths("LOCAL_ACONFIG_FILES", aconfigFiles[""])
// TODO(b/311155208): The default container here should be system.
container := ""
if m.SocSpecific() {
container = "vendor"
} else if m.ProductSpecific() {
container = "product"
} else if m.SystemExtSpecific() {
container = "system_ext"
}
entries.SetPaths("LOCAL_ACONFIG_FILES", aconfigFiles[container])
}