Gate access to targetsdk-max-p,q on compat framework

Replace targetSDK checks for those APIs, keep it for greylist-max-o.
This will allow toggling access to APIs that are in greylist-max-p and
greylist-max-q (two separate toggles).

Bug: 149994052
Bug: 149997251
Test: mma test-art-host-gtest-hidden_api_test64
Change-Id: I00777bbeefba50a0863a6645b77e60d48e9bb768
2 files changed