Lines Matching refs:p
109 func (p *prebuiltCommon) initPrebuiltCommon(module android.Module, properties *PrebuiltCommonProper…
110 p.prebuiltCommonProperties = properties
115 func (p *prebuiltCommon) ApexVariationName() string {
116 return proptools.StringDefault(p.prebuiltCommonProperties.Apex_name, p.ModuleBase.BaseModuleName())
119 func (p *prebuiltCommon) Prebuilt() *android.Prebuilt {
120 return &p.prebuilt
123 func (p *prebuiltCommon) isForceDisabled() bool {
124 return p.prebuiltCommonProperties.ForceDisable
127 func (p *prebuiltCommon) checkForceDisable(ctx android.ModuleContext) bool {
141 if forceDisable && p.prebuilt.SourceExists() {
142 p.prebuiltCommonProperties.ForceDisable = true
148 func (p *prebuiltCommon) InstallFilename() string {
149 …return proptools.StringDefault(p.prebuiltCommonProperties.Filename, p.BaseModuleName()+imageApexSu…
152 func (p *prebuiltCommon) Name() string {
153 return p.prebuilt.Name(p.ModuleBase.Name())
156 func (p *prebuiltCommon) Overrides() []string {
157 return p.prebuiltCommonProperties.Overrides
160 func (p *prebuiltCommon) installable() bool {
161 return proptools.BoolDefault(p.prebuiltCommonProperties.Installable, true)
166 func (p *prebuiltCommon) initApexFilesForAndroidMk(ctx android.ModuleContext) {
176 p.apexFilesForAndroidMk = append(p.apexFilesForAndroidMk, apexFile{
193 func (p *prebuiltCommon) AndroidMkEntries() []android.AndroidMkEntries {
197 OutputFile: android.OptionalPathForPath(p.outputApex),
199 Host_required: p.hostRequired,
202 entries.SetString("LOCAL_MODULE_PATH", p.installDir.ToMakePath().String())
203 entries.SetString("LOCAL_MODULE_STEM", p.installFilename)
204 entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !p.installable())
205 entries.AddStrings("LOCAL_OVERRIDES_MODULES", p.prebuiltCommonProperties.Overrides...)
206 postInstallCommands := append([]string{}, p.postInstallCommands...)
207 postInstallCommands = append(postInstallCommands, p.compatSymlinks...)
219 apexName := p.BaseModuleName()
220 for _, fi := range p.apexFilesForAndroidMk {
221 entries := p.createEntriesForApexFile(fi, apexName)
229 func (p *prebuiltCommon) createEntriesForApexFile(fi apexFile, apexName string) android.AndroidMkEn…
238 entries.SetString("LOCAL_MODULE_PATH", p.installDir.ToMakePath().String())
293 func (p *prebuiltCommon) prebuiltApexContentsDeps(ctx android.BottomUpMutatorContext) {
297 for _, exported := range p.prebuiltCommonProperties.Exported_java_libs {
304 for _, exported := range p.prebuiltCommonProperties.Exported_bootclasspath_fragments {
311 func (p *prebuiltCommon) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
342 func (p *prebuiltCommon) apexInfoMutator(mctx android.TopDownMutatorContext) {
401 apexVariationName := p.ApexVariationName()
405 …InApexModules: []string{p.ModuleBase.BaseModuleName()}, // BaseModuleName() to avoid the prebu…
436 func (p *prebuiltApexSelectorModule) Srcs() android.Paths {
437 return android.Paths{p.inputApex}
440 func (p *prebuiltApexSelectorModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
441 …p.inputApex = android.SingleSourcePathFromSupplier(ctx, p.apexFileProperties.prebuiltApexSelector,…
481 func (p *ApexFileProperties) prebuiltApexSelector(ctx android.BaseModuleContext, prebuilt android.M…
490 src = String(p.Arch.Arm.Src)
492 src = String(p.Arch.Arm64.Src)
494 src = String(p.Arch.X86.Src)
496 src = String(p.Arch.X86_64.Src)
499 src = String(p.Src)
521 func (p *Prebuilt) OutputFiles(tag string) (android.Paths, error) {
524 return android.Paths{p.outputApex}, nil
694 func (p *Prebuilt) createPrebuiltApexModules(ctx android.TopDownMutatorContext) {
695 baseModuleName := p.BaseModuleName()
698 createApexSelectorModule(ctx, apexSelectorModuleName, &p.properties.ApexFileProperties)
701 …createDeapexerModuleIfNeeded(ctx, deapexerModuleName(baseModuleName), apexFileSource, p.prebuiltCo…
704 p.prebuiltCommonProperties.Selected_apex = proptools.StringPtr(apexFileSource)
707 func (p *Prebuilt) ComponentDepsMutator(ctx android.BottomUpMutatorContext) {
708 p.prebuiltApexContentsDeps(ctx)
713 func (p *Prebuilt) ApexInfoMutator(mctx android.TopDownMutatorContext) {
714 p.apexInfoMutator(mctx)
717 func (p *Prebuilt) GenerateAndroidBuildActions(ctx android.ModuleContext) {
719 …p.inputApex = android.OptionalPathForModuleSrc(ctx, p.prebuiltCommonProperties.Selected_apex).Path…
720 p.installDir = android.PathForModuleInstall(ctx, "apex")
721 p.installFilename = p.InstallFilename()
722 if !strings.HasSuffix(p.installFilename, imageApexSuffix) {
725 p.outputApex = android.PathForModuleOut(ctx, p.installFilename)
728 Input: p.inputApex,
729 Output: p.outputApex,
732 if p.prebuiltCommon.checkForceDisable(ctx) {
733 p.HideFromMake()
738 p.initApexFilesForAndroidMk(ctx)
740 if p.installable() {
741 ctx.InstallFile(p.installDir, p.installFilename, p.inputApex)
745 p.compatSymlinks = makeCompatSymlinks(p.BaseModuleName(), ctx)
747 for _, overridden := range p.prebuiltCommonProperties.Overrides {
748 p.compatSymlinks = append(p.compatSymlinks, makeCompatSymlinks(overridden, ctx)...)
771 func (p *prebuiltApexExtractorModule) Srcs() android.Paths {
772 return android.Paths{p.extractedApex}
775 func (p *prebuiltApexExtractorModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
777 return p.properties.prebuiltSrcs(ctx)
780 p.extractedApex = android.PathForModuleOut(ctx, "extracted", apexSet.Base())
786 Output: p.extractedApex,
789 "allow-prereleased": strconv.FormatBool(proptools.Bool(p.properties.Prerelease)),