Replace libmetricslogger logging with up-call to Java for hidden api

Use VMRuntime.hiddenApiUsedWith{JNI,Reflection} instead of depending on
libmetricslogger

Topic: hidden-api-reporting-upcall
Test: m
Bug: 119217680
Change-Id: Ifaf0b0e4ae271f6fcd37e8d7cf917a3b81d8ddae
Merged-In: I3292f1d20cc8635391cddc3ba60d4a80b578fa82
diff --git a/runtime/hidden_api.h b/runtime/hidden_api.h
index 8bd59ea..e15e9f3 100644
--- a/runtime/hidden_api.h
+++ b/runtime/hidden_api.h
@@ -45,11 +45,13 @@
   return static_cast<EnforcementPolicy>(api_policy_int);
 }
 
+// Hidden API access method
+// Thist must be kept in sync with VMRuntime.HiddenApiUsageLogger.ACCESS_METHOD_*
 enum class AccessMethod {
-  kNone,  // internal test that does not correspond to an actual access by app
-  kReflection,
-  kJNI,
-  kLinking,
+  kNone = 0,  // internal test that does not correspond to an actual access by app
+  kReflection = 1,
+  kJNI = 2,
+  kLinking = 3,
 };
 
 // Represents the API domain of a caller/callee.