Merge "Assert android.ApexModule interface for types having ApexModuleBase"

This commit is contained in:
Treehugger Robot
2020-12-17 04:14:35 +00:00
committed by Gerrit Code Review
8 changed files with 39 additions and 0 deletions

View File

@@ -1065,6 +1065,9 @@ func (mod *Module) minSdkVersion() string {
return String(mod.Properties.Min_sdk_version)
}
var _ android.ApexModule = (*Module)(nil)
// Implements android.ApexModule
func (mod *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion android.ApiLevel) error {
minSdkVersion := mod.minSdkVersion()
if minSdkVersion == "apex_inherit" {
@@ -1087,6 +1090,7 @@ func (mod *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVer
return nil
}
// Implements android.ApexModule
func (mod *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
depTag := ctx.OtherModuleDependencyTag(dep)