From 00cae1cc88773a5238809130841b6a6b7eb63614 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 18 Feb 2020 12:50:44 +0000 Subject: Reland "Turn on the instrumentation by default for the java code in APEXes" This reverts commit c021ea0b3543d4ff64b16414c0276b96dc5b2c4b. Bug: 149353192 Change-Id: I2b1c0736202de26c5ea88c0ab14574bd7207a5fb Test: N/A (this is a clean revert) forward fix will be followed --- java/java.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java/java.go') diff --git a/java/java.go b/java/java.go index 462dba809..b33cb2aa3 100644 --- a/java/java.go +++ b/java/java.go @@ -1519,6 +1519,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) } -- cgit v1.2.3-59-g8ed1b