Add flag for clamping hidden api list
Allow clamping the hidden api list to a max value; if an API is
restricted for a newer SDK, transform it into a regular unsupported API.
This change is laying out the groundwork to ensure that older platforms
do not receive dex code updated that has unknown hidden api flags - e.g.
if the hidden api encode step uses '--max-hiddenapi-level=max-target-q',
then the resulting dex code will not exhibit undefined behavior with respect to
hidden api access when running on R devices, and any newer 'max-target-r' APIs
will be marked as 'unsupported'.
Test: mma test-art-host-gtest-art_hiddenapi_tests
Bug: 172453495
Merged-In: I710c440c8429081096d8a417f164c0e01c97ecd9
Change-Id: I710c440c8429081096d8a417f164c0e01c97ecd9
(cherry picked from commit a6b3b297bdd70ad3e915a48b02a7c7cf5f204e05)
3 files changed