Merge "Introduce product variables to select Java code coverage paths in Soong."

This commit is contained in:
Roland Levillain
2020-06-15 18:41:03 +00:00
committed by Gerrit Code Review
3 changed files with 27 additions and 1 deletions

View File

@@ -601,7 +601,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 {