Make prebuilt properties customizable

Previously whether prebuilt properties were customizable was dependent
on the order of calling various inits.

Test: go test soong tests
Bug: 191975220
Change-Id: Icaa1fe811a5f5fc4aa5fc9fa0ec0b90debe3d537
This commit is contained in:
Liz Kammer
2021-06-24 13:03:06 -04:00
parent 789093a9ad
commit 69d6413dd0
2 changed files with 36 additions and 0 deletions

View File

@@ -166,6 +166,7 @@ type PrebuiltSrcsSupplier func(ctx BaseModuleContext, prebuilt Module) []string
func InitPrebuiltModuleWithSrcSupplier(module PrebuiltInterface, srcsSupplier PrebuiltSrcsSupplier, srcsPropertyName string) {
p := module.Prebuilt()
module.AddProperties(&p.properties)
module.base().customizableProperties = module.GetProperties()
if srcsSupplier == nil {
panic(fmt.Errorf("srcsSupplier must not be nil"))