diff options
author | 2020-02-25 07:02:33 +0000 | |
---|---|---|
committer | 2020-02-25 07:02:33 +0000 | |
commit | 139fa4320ff5d43591bee411d6ea3f5f10bdea63 (patch) | |
tree | 03a860a3b7ee495ff5dc041a273725ed793dc1a8 /java/hiddenapi.go | |
parent | 4483601b58de2d4d272106002b8e24b9506166d2 (diff) | |
parent | 93e57a0b862beabdd11b8dac342167ea7f7c7b76 (diff) |
Merge changes Ibaf383c4,I2b1c0736
* changes:
Expect added members for instrumented modules
Reland "Turn on the instrumentation by default for the java code in APEXes"
Diffstat (limited to 'java/hiddenapi.go')
-rw-r--r-- | java/hiddenapi.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/hiddenapi.go b/java/hiddenapi.go index d48c7675d..884a757e2 100644 --- a/java/hiddenapi.go +++ b/java/hiddenapi.go @@ -170,9 +170,21 @@ func hiddenAPIEncodeDex(ctx android.ModuleContext, output android.WritablePath, tmpOutput = android.PathForModuleOut(ctx, "hiddenapi", "unaligned", "unaligned.jar") tmpDir = android.PathForModuleOut(ctx, "hiddenapi", "unaligned") } + + enforceHiddenApiFlagsToAllMembers := true // If frameworks/base doesn't exist we must be building with the 'master-art' manifest. // Disable assertion that all methods/fields have hidden API flags assigned. if !ctx.Config().FrameworksBaseDirExists(ctx) { + enforceHiddenApiFlagsToAllMembers = false + } + // b/149353192: when a module is instrumented, jacoco adds synthetic members + // $jacocoData and $jacocoInit. Since they don't exist when building the hidden API flags, + // don't complain when we don't find hidden API flags for the synthetic members. + if j, ok := ctx.Module().(*Library); ok && j.shouldInstrument(ctx) { + enforceHiddenApiFlagsToAllMembers = false + } + + if !enforceHiddenApiFlagsToAllMembers { hiddenapiFlags = "--no-force-assign-all" } |