summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2020-12-15 22:29:02 +0900
committerJiyong Park <jiyong@google.com>2020-12-15 14:31:27 +0000
commit45bf82e95361bffb1cf0f17ebf45aef05a8e03b8 (patch)
tree67f3800a8d78968e280e69426d0f5c17b37a3704 /java/java.go
parente8e86068921cf7d402d6781604f743a9e43e0e1c (diff)
Assert android.ApexModule interface for types having ApexModuleBase
Bug: 173472337 Test: m nothing Change-Id: Idf1c6cb9fff6c18e34c4636e38a662ba4ff7d538
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index d44719e99..02d78f2bf 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2021,10 +2021,12 @@ func (j *Module) hasCode(ctx android.ModuleContext) bool {
return len(srcFiles) > 0 || len(ctx.GetDirectDepsWithTag(staticLibTag)) > 0
}
+// Implements android.ApexModule
func (j *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
return j.depIsInSameApex(ctx, dep)
}
+// Implements android.ApexModule
func (j *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
sdkVersion android.ApiLevel) error {
sdkSpec := j.minSdkVersion()
@@ -2070,6 +2072,8 @@ type Library struct {
InstallMixin func(ctx android.ModuleContext, installPath android.Path) (extraInstallDeps android.Paths)
}
+var _ android.ApexModule = (*Library)(nil)
+
// Provides access to the list of permitted packages from updatable boot jars.
type PermittedPackagesForUpdatableBootJars interface {
PermittedPackagesForUpdatableBootJars() []string
@@ -2934,10 +2938,14 @@ func (j *Import) SrcJarArgs() ([]string, android.Paths) {
return nil, nil
}
+var _ android.ApexModule = (*Import)(nil)
+
+// Implements android.ApexModule
func (j *Import) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
return j.depIsInSameApex(ctx, dep)
}
+// Implements android.ApexModule
func (j *Import) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
sdkVersion android.ApiLevel) error {
// Do not check for prebuilts against the min_sdk_version of enclosing APEX
@@ -3129,6 +3137,9 @@ func (j *DexImport) DexJarBuildPath() android.Path {
return j.dexJarFile
}
+var _ android.ApexModule = (*DexImport)(nil)
+
+// Implements android.ApexModule
func (j *DexImport) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
sdkVersion android.ApiLevel) error {
// we don't check prebuilt modules for sdk_version