aboutsummaryrefslogtreecommitdiffstats
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 5632ff58..72c91a5e 100644
--- a/java/java.go
+++ b/java/java.go
@@ -633,7 +633,9 @@ type jniLib struct {
}
func (j *Module) shouldInstrument(ctx android.BaseModuleContext) bool {
- return j.properties.Instrument && ctx.Config().IsEnvTrue("EMMA_INSTRUMENT")
+ return j.properties.Instrument &&
+ ctx.Config().IsEnvTrue("EMMA_INSTRUMENT") &&
+ ctx.DeviceConfig().JavaCoverageEnabledForPath(ctx.ModuleDir())
}
func (j *Module) shouldInstrumentStatic(ctx android.BaseModuleContext) bool {