summaryrefslogtreecommitdiff
path: root/test/HiddenApiSignatures/Interface.java
AgeCommit message (Collapse)Author
2018-05-03Fix hiddenapi::MemberSignature for proxiesDavid Brazdil
Proxy classes are classes generated at runtime which implement a given interface. Because they do not inherit the associated dex file form the interface(s), names/signatures of methods cannot be requested directly, but rather through the original interface method. Calling getName() on a proxy mirror::Class also triggers a DCHECK. This patch will refer to the interface method when printing the signature instead of the proxy method. This fixes the warning printed for the proxy method, printing even the class name of the interface instead of the name of the proxy class. This is meant to provide useful info to the devloper. Proxies do not define fields except for the synthetic 'interfaces' and 'throws' fields. Their signatures remain unchanged. This patch also continues to check the access flags of the proxy method for performance reasons. De-proxying the method would introduce two new memory accesses into the fast path. That means deduplication of warnings remains independent between the original and proxy methods. Bug: 78327881 Test: make test-art-host-gtest-hidden_api_test Change-Id: I8f334e5e2b62ca38691c94524edaf198eb73574b