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
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index bdebe2d..c9a7733 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -398,6 +398,7 @@
     bool is_default_conflict = IsDefaultConflicting();
     bool is_compilable = IsCompilable();
     bool must_count_locks = MustCountLocks();
+    HiddenApiAccessFlags::ApiList hidden_api_list = GetHiddenApiAccessFlags();
     SetAccessFlags(new_value);
     DCHECK_EQ(java_flags, (GetAccessFlags() & kAccJavaFlagsMask));
     DCHECK_EQ(is_constructor, IsConstructor());
@@ -411,6 +412,7 @@
     DCHECK_EQ(is_default_conflict, IsDefaultConflicting());
     DCHECK_EQ(is_compilable, IsCompilable());
     DCHECK_EQ(must_count_locks, MustCountLocks());
+    DCHECK_EQ(hidden_api_list, GetHiddenApiAccessFlags());
   } else {
     SetAccessFlags(new_value);
   }