Merge changes I4e7a7ac5,I0c73361b
* changes: Record the actual APEXes that a module is part of. Rename InApexes -> InApexVariants
This commit is contained in:
@@ -89,7 +89,7 @@ func (b *bootJarsSingleton) GenerateBuildActions(ctx android.SingletonContext) {
|
||||
name := android.RemoveOptionalPrebuiltPrefix(ctx.ModuleName(module))
|
||||
if apex, ok := moduleToApex[name]; ok {
|
||||
apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo)
|
||||
if (apex == "platform" && apexInfo.IsForPlatform()) || apexInfo.InApexByBaseName(apex) {
|
||||
if (apex == "platform" && apexInfo.IsForPlatform()) || apexInfo.InApexModule(apex) {
|
||||
// The module name/apex variant should be unique in the system but double check
|
||||
// just in case something has gone wrong.
|
||||
if existing, ok := nameToApexVariant[name]; ok {
|
||||
|
@@ -167,11 +167,11 @@ func isModuleInConfiguredList(ctx android.BaseModuleContext, module android.Modu
|
||||
// Now match the apex part of the boot image configuration.
|
||||
requiredApex := configuredBootJars.Apex(index)
|
||||
if requiredApex == "platform" || requiredApex == "system_ext" {
|
||||
if len(apexInfo.InApexes) != 0 {
|
||||
if len(apexInfo.InApexVariants) != 0 {
|
||||
// A platform variant is required but this is for an apex so ignore it.
|
||||
return false
|
||||
}
|
||||
} else if !apexInfo.InApexByBaseName(requiredApex) {
|
||||
} else if !apexInfo.InApexVariantByBaseName(requiredApex) {
|
||||
// An apex variant for a specific apex is required but this is the wrong apex.
|
||||
return false
|
||||
}
|
||||
|
@@ -225,7 +225,7 @@ func (b *platformBootclasspathModule) checkNonUpdatableModules(ctx android.Modul
|
||||
fromUpdatableApex := apexInfo.Updatable
|
||||
if fromUpdatableApex {
|
||||
// error: this jar is part of an updatable apex
|
||||
ctx.ModuleErrorf("module %q from updatable apexes %q is not allowed in the framework boot image", ctx.OtherModuleName(m), apexInfo.InApexes)
|
||||
ctx.ModuleErrorf("module %q from updatable apexes %q is not allowed in the framework boot image", ctx.OtherModuleName(m), apexInfo.InApexVariants)
|
||||
} else {
|
||||
// ok: this jar is part of the platform or a non-updatable apex
|
||||
}
|
||||
|
@@ -1546,7 +1546,7 @@ func PrebuiltJars(ctx android.BaseModuleContext, baseName string, s android.SdkS
|
||||
func withinSameApexesAs(ctx android.BaseModuleContext, other android.Module) bool {
|
||||
apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
|
||||
otherApexInfo := ctx.OtherModuleProvider(other, android.ApexInfoProvider).(android.ApexInfo)
|
||||
return len(otherApexInfo.InApexes) > 0 && reflect.DeepEqual(apexInfo.InApexes, otherApexInfo.InApexes)
|
||||
return len(otherApexInfo.InApexVariants) > 0 && reflect.DeepEqual(apexInfo.InApexVariants, otherApexInfo.InApexVariants)
|
||||
}
|
||||
|
||||
func (module *SdkLibrary) sdkJars(ctx android.BaseModuleContext, sdkVersion android.SdkSpec, headerJars bool) android.Paths {
|
||||
|
@@ -378,7 +378,7 @@ func apexNamePairFromModule(ctx *android.TestContext, module android.Module) str
|
||||
if apexInfo.IsForPlatform() {
|
||||
apex = "platform"
|
||||
} else {
|
||||
apex = apexInfo.InApexes[0]
|
||||
apex = apexInfo.InApexVariants[0]
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s:%s", apex, name)
|
||||
|
Reference in New Issue
Block a user