diff options
author | 2020-05-19 21:07:52 +0100 | |
---|---|---|
committer | 2020-05-20 08:19:56 +0100 | |
commit | c495d2bfedeae5be42cc7ac475b45f78770683ef (patch) | |
tree | 907ab696207f82fe8bd16d94c2aec211003894e0 /java/hiddenapi.go | |
parent | f32bbf89de42a4f641576649cbb6d7565312de08 (diff) |
Add --no-force-assign-all for java_sdk_library
Previously, the flag was only added for java_library modules that were
being instrumented. This will also add if for java_sdk_library modules
too.
Bug: 156705688
Test: TARGET_BUILD_VARIANT=userdebug PRODUCT=mainline_modules_x86 EMMA_INSTRUMENT=true NATIVE_COVERAGE=true ./vendor/google/build/build_unbundled_coverage_mainline_module.sh -j8
Merged-In: I5d06ec037007b1770748df24a2e2e8691f177f4f
Change-Id: I5d06ec037007b1770748df24a2e2e8691f177f4f
(cherry picked from commit 31b84c83bff42cb432e1286c7ba0cdd409b43978)
Diffstat (limited to 'java/hiddenapi.go')
-rw-r--r-- | java/hiddenapi.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/hiddenapi.go b/java/hiddenapi.go index 884a757e2..ce624bfc1 100644 --- a/java/hiddenapi.go +++ b/java/hiddenapi.go @@ -180,7 +180,9 @@ func hiddenAPIEncodeDex(ctx android.ModuleContext, output android.WritablePath, // 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) { + if j, ok := ctx.Module().(interface { + shouldInstrument(android.BaseModuleContext) bool + }); ok && j.shouldInstrument(ctx) { enforceHiddenApiFlagsToAllMembers = false } |