Merge "Turn on the instrumentation by default for the java code in APEXes" am: 1d62b1c536 am: 8e254a5fdb

Change-Id: I63da8aa76a557da1af56ee2c9ee4358639bd643b
This commit is contained in:
Treehugger Robot
2020-02-14 22:33:31 +00:00

View File

@@ -1510,6 +1510,11 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) {
j.headerJarFile = j.implementationJarFile
}
// Force enable the instrumentation for java code that is built for APEXes
if android.DirectlyInAnyApex(ctx, ctx.ModuleName()) && !j.IsForPlatform() {
j.properties.Instrument = true
}
if j.shouldInstrument(ctx) {
outputFile = j.instrument(ctx, flags, outputFile, jarName)
}