Set runtime hidden API access flags

The hiddenapi tool encodes new access flags into boot class path
dex files, but we do not want to use those at runtime. They are
cumbersome to decode and interfere with other flags.

This patch introduces new runtime access flags kAccHiddenApiBits,
two consecutive bits in the space occupied by intrinsic ordinals
which are used to encode the four categories of APIs in
HiddenApiAccessFlags::ApiList. ClassLinker converts one encoding
to the other when a new method/field is loaded from DexFile.

DexHiddenAccessFlags have been made an internal class of new
HiddenApiAccessFlags class which contains all the code related
to encoding/decoding these flags for both DexFile and runtime.

Test: m test-art-host
Bug: 64382372
Change-Id: Ie055dc3440c44e8815030e652f08d9ee3dba69e5
9 files changed