Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e254a5f authored by Treehugger Robot's avatar Treehugger Robot
Browse files

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

Change-Id: Iba752fc4929e26106f19d3f260a68bfc033915b1
parents 81c9f33a 1d62b1c5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)
	}