Merge "Introduce product variables to select Java code coverage paths in Soong." am: d38ab21c6e am: f76e10aa2b

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1326321

Change-Id: I3f66962252aac710d66f3f26908a7b5f530fa712
This commit is contained in:
Roland Levillain
2020-06-15 19:07:06 +00:00
committed by Automerger Merge Worker
3 changed files with 27 additions and 1 deletions

View File

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