Pass SdkMember to AddPrebuiltModule instead of the name

This is needed for a follow up change that makes sure that the
prebuilt modules have the same visibility as the source modules.

Bug: 143678475
Test: m conscrypt-module-sdk
Change-Id: I9461c8c094ab19ee9ececb5e5fd50565789f2fa2
This commit is contained in:
Paul Duffin
2019-12-05 18:19:29 +00:00
parent 667039f404
commit 9d8d609fcd
5 changed files with 10 additions and 9 deletions

View File

@@ -368,7 +368,8 @@ func (s *snapshotBuilder) UnzipToSnapshot(zipPath android.Path, destDir string)
s.zipsToMerge = append(s.zipsToMerge, tmpZipPath)
}
func (s *snapshotBuilder) AddPrebuiltModule(name string, moduleType string) android.BpModule {
func (s *snapshotBuilder) AddPrebuiltModule(member android.SdkMember, moduleType string) android.BpModule {
name := member.Name()
if s.prebuiltModules[name] != nil {
panic(fmt.Sprintf("Duplicate module detected, module %s has already been added", name))
}