diff options
| author | Jiyong Park <jiyong@google.com> | 2020-02-18 12:50:44 +0000 |
|---|---|---|
| committer | Jiyong Park <jiyong@google.com> | 2020-02-25 11:34:09 +0000 |
| commit | 81aaa0c1bd99e38f61611d574712a761e3ef8508 (patch) | |
| tree | 2ac2a587b64a4b92b58460fbd371921f7fd364a0 /java/java.go | |
| parent | 2ad2a7dfca9ff1be6d675f27398115ebfac74cea (diff) | |
Reland "Turn on the instrumentation by default for the java code in APEXes"
This reverts commit c021ea0b3543d4ff64b16414c0276b96dc5b2c4b.
Exempt-From-Owner-Approval: cherry-pick from aosp
Bug: 149353192
Merged-In: I2b1c0736202de26c5ea88c0ab14574bd7207a5fb
Test: N/A (this is a clean revert) forward fix will be followed
(cherry picked from commit 00cae1cc88773a5238809130841b6a6b7eb63614)
Change-Id: I2b1c0736202de26c5ea88c0ab14574bd7207a5fb
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index c89784a03..1273eff9c 100644 --- a/java/java.go +++ b/java/java.go @@ -1521,6 +1521,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) } |
