diff options
Diffstat (limited to 'android/apex.go')
-rw-r--r-- | android/apex.go | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/android/apex.go b/android/apex.go index 91fa2c718..57baff5cf 100644 --- a/android/apex.go +++ b/android/apex.go @@ -196,7 +196,7 @@ func IsDepInSameApex(ctx BaseModuleContext, module, dep Module) bool { return false } - if !ctx.EqualModules(ctx.Module(), module) { + if !EqualModules(ctx.Module(), module) { if moduleInfo, ok := OtherModuleProvider(ctx, module, DepInSameApexInfoProvider); ok { if !moduleInfo.Checker.OutgoingDepIsInSameApex(depTag) { return false @@ -646,6 +646,13 @@ type ApexBundleDepsInfoIntf interface { FullListPath() Path } +type ApexBundleDepsData struct { + Updatable bool + FlatListPath Path +} + +var ApexBundleDepsDataProvider = blueprint.NewProvider[ApexBundleDepsData]() + func (d *ApexBundleDepsInfo) FlatListPath() Path { return d.flatListPath } @@ -688,7 +695,7 @@ func (d *ApexBundleDepsInfo) BuildDepsInfoLists(ctx ModuleContext, minSdkVersion // Function called while walking an APEX's payload dependencies. // // Return true if the `to` module should be visited, false otherwise. -type PayloadDepsCallback func(ctx BaseModuleContext, from Module, to ApexModule, externalDep bool) bool +type PayloadDepsCallback func(ctx BaseModuleContext, from, to ModuleProxy, externalDep bool) bool type WalkPayloadDepsFunc func(ctx BaseModuleContext, do PayloadDepsCallback) // ModuleWithMinSdkVersionCheck represents a module that implements min_sdk_version checks @@ -716,7 +723,7 @@ func CheckMinSdkVersion(ctx ModuleContext, minSdkVersion ApiLevel, walk WalkPayl return } - walk(ctx, func(ctx BaseModuleContext, from Module, to ApexModule, externalDep bool) bool { + walk(ctx, func(ctx BaseModuleContext, from, to ModuleProxy, externalDep bool) bool { if externalDep { // external deps are outside the payload boundary, which is "stable" // interface. We don't have to check min_sdk_version for external @@ -726,7 +733,7 @@ func CheckMinSdkVersion(ctx ModuleContext, minSdkVersion ApiLevel, walk WalkPayl if !IsDepInSameApex(ctx, from, to) { return false } - if info, ok := OtherModuleProvider(ctx, to, CommonModuleInfoKey); ok && info.ModuleWithMinSdkVersionCheck { + if info, ok := OtherModuleProvider(ctx, to, CommonModuleInfoProvider); ok && info.ModuleWithMinSdkVersionCheck { if info.MinSdkVersion.ApiLevel == nil || !info.MinSdkVersion.ApiLevel.Specified() { // This dependency performs its own min_sdk_version check, just make sure it sets min_sdk_version // to trigger the check. @@ -758,7 +765,7 @@ type MinSdkVersionFromValueContext interface { // implementing this interface should provide an implementation. A module supports an sdk // version when the module's min_sdk_version is equal to or less than the given sdk version. func ShouldSupportSdkVersion(ctx BaseModuleContext, module Module, sdkVersion ApiLevel) error { - info, ok := OtherModuleProvider(ctx, module, CommonModuleInfoKey) + info, ok := OtherModuleProvider(ctx, module, CommonModuleInfoProvider) if !ok || info.MinSdkVersionSupported.IsNone() { return fmt.Errorf("min_sdk_version is not specified") } |