summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2018-01-02 19:02:07 +0900
committerJiyong Park <jiyong@google.com>2018-01-02 21:41:29 +0900
commit3b0867ec3a5606e900d7a5bbc9506f9375b4f9db (patch)
treeca1d27678158a0a218f3b3607591705b940eb88b /tools/aapt2/java/JavaClassGenerator.cpp
parentea713a3882d11675ca067ad63ab01a664d012f3b (diff)
Make SystemApi retained at runtime
SystemApi annotation is now retained at runtime in order for the CtsSignatureTest to extract the list of System APIs from the device and compare it with the known list of the APIs. Until now, the test only ensured that the known list of the APIs exist in the device, but didn't ensured the opposite. In order words, it was possible for device manufacturers to revive the APIs that were once deleted. This will become a problem when SystemAPIs will be allowed to non-system partitions such as vendor. An apk in the vendor partition which is using the revived-but-officially-deleted System API will break when the system partition is replaced with the Generic System Image (GSI) built from AOSP, which doesn't have the deleted API. (Running CTS on GSI is part of the Treble compliance tests) The overhead of retaining this annotation at runtime is small, because the relationship from an entity (a class, a field, a member, etc) to the annotation is recorded as a 4 byte offset field [1]. [1] https://source.android.com/devices/tech/dalvik/dex-format#annotations-directory Bug: 70832217 Bug: 67891551 Test: measure the size increment before and after. framework.jar was increased by 2964 byte. Change-Id: I679b19ac5ce57d33ce59e32b3b1753f8a1962e11
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions