diff options
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go index 2d97b7f3b..052e06f6f 100644 --- a/java/java.go +++ b/java/java.go @@ -466,7 +466,6 @@ type dependencyTag struct { type jniDependencyTag struct { blueprint.BaseDependencyTag - target android.Target } func IsJniDepTag(depTag blueprint.DependencyTag) bool { @@ -559,6 +558,16 @@ func (j *Module) targetSdkVersion() string { return j.sdkVersion() } +func (j *Module) AvailableFor(what string) bool { + if what == android.AvailableToPlatform && Bool(j.deviceProperties.Hostdex) { + // Exception: for hostdex: true libraries, the platform variant is created + // even if it's not marked as available to platform. In that case, the platform + // variant is used only for the hostdex and not installed to the device. + return true + } + return j.ApexModuleBase.AvailableFor(what) +} + func (j *Module) deps(ctx android.BottomUpMutatorContext) { if ctx.Device() { sdkDep := decodeSdkDep(ctx, sdkContext(j)) |