summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2020-12-09 21:18:56 +0900
committerJiyong Park <jiyong@google.com>2020-12-15 09:17:36 +0900
commitf7c3bbe4338224c5966a24040f5673c100740c72 (patch)
tree5be7df43524be4e97d2e22e9cea52d08b4759c87 /java/java.go
parent9ae3c52b20bb787d802febbb035f681dd2b52754 (diff)
Prebuilt stub not available to platform is handled correctly
When a shared library providing stubs is included in an APEX, only the stub variant (i.e. version:"1", etc.) gets emitted to Android.mk. This enforces that everything in the Make world to link to the stub providing only the public APIs of the library. The non-stub variant (i.e. version:"") isn't exposed, otherwise, others will be able to access private part of the lib which isn't guaranteed to be stable. This has been done by unhiding the stub variant when it is known that the library is actually included in an APEX. Note that stub variants are by default hidden. The above mechanism however doesn't work when the shared library is replaced by a prebuilt and when the APEX is also replaced by a prebuilt. Then, the fact that the prebuilt library is actually in the APEX gets lost. In that case, AnyVariantDirectlyInAnyApex() returns false for the prebuilt library. As a result, the stub variant remains hidden and not emitted to Android.mk. This change fixes the problem by checking if the lib isn't available for the platform at all. If not available for the platform (e.g. apex_available doesn't have "//apex_available:platform"), the lib is assumed to be included in an APEX even when it actually didn't go through the apex mutator (... because it's a prebuilt). Bug: 175166063 Test: m nothing Change-Id: I41fabd5b368baecf4dc3c5a080b466f8bcd79d77
Diffstat (limited to 'java/java.go')
0 files changed, 0 insertions, 0 deletions