ART: Depend on libnativehelper headers only

Depend on header-only versions where possible. Move projects
excluding libart to libnativehelper_header_only.

Bug: 65522645
Test: mmma art
Change-Id: I53dd3b2a97e94ee685f72de007ed3858f7f5c6b6
diff --git a/openjdkjvmti/Android.bp b/openjdkjvmti/Android.bp
index 84a90d6..eebfec4 100644
--- a/openjdkjvmti/Android.bp
+++ b/openjdkjvmti/Android.bp
@@ -50,10 +50,12 @@
         "ti_timers.cc",
         "transform.cc",
     ],
-    header_libs: ["libopenjdkjvmti_headers"],
+    header_libs: [
+        "libnativehelper_header_only",
+        "libopenjdkjvmti_headers",
+    ],
     shared_libs: [
         "libbase",
-        "libnativehelper",
     ],
 }
 
diff --git a/openjdkjvmti/events-inl.h b/openjdkjvmti/events-inl.h
index 3973e94..d97916f 100644
--- a/openjdkjvmti/events-inl.h
+++ b/openjdkjvmti/events-inl.h
@@ -24,7 +24,7 @@
 #include "base/mutex-inl.h"
 #include "events.h"
 #include "jni_internal.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "scoped_thread_state_change-inl.h"
 #include "ti_breakpoint.h"
 
diff --git a/openjdkjvmti/events.cc b/openjdkjvmti/events.cc
index 0282fbc..381dc1f 100644
--- a/openjdkjvmti/events.cc
+++ b/openjdkjvmti/events.cc
@@ -49,7 +49,7 @@
 #include "mirror/class.h"
 #include "mirror/object-inl.h"
 #include "monitor.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "runtime.h"
 #include "scoped_thread_state_change-inl.h"
 #include "stack.h"
diff --git a/openjdkjvmti/jvmti_weak_table-inl.h b/openjdkjvmti/jvmti_weak_table-inl.h
index 1c82255..5d20946 100644
--- a/openjdkjvmti/jvmti_weak_table-inl.h
+++ b/openjdkjvmti/jvmti_weak_table-inl.h
@@ -44,7 +44,7 @@
 #include "jvmti_allocator.h"
 #include "mirror/class.h"
 #include "mirror/object.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "runtime.h"
 
 namespace openjdkjvmti {
diff --git a/openjdkjvmti/ti_breakpoint.cc b/openjdkjvmti/ti_breakpoint.cc
index 75c8027..9c3687f 100644
--- a/openjdkjvmti/ti_breakpoint.cc
+++ b/openjdkjvmti/ti_breakpoint.cc
@@ -43,7 +43,7 @@
 #include "mirror/class-inl.h"
 #include "mirror/object_array-inl.h"
 #include "modifiers.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "runtime_callbacks.h"
 #include "scoped_thread_state_change-inl.h"
 #include "thread-current-inl.h"
diff --git a/openjdkjvmti/ti_class.cc b/openjdkjvmti/ti_class.cc
index 5f29416..e69c78b 100644
--- a/openjdkjvmti/ti_class.cc
+++ b/openjdkjvmti/ti_class.cc
@@ -60,7 +60,7 @@
 #include "mirror/object_array-inl.h"
 #include "mirror/object_reference.h"
 #include "mirror/reference.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "primitive.h"
 #include "reflection.h"
 #include "runtime.h"
diff --git a/openjdkjvmti/ti_class_loader.cc b/openjdkjvmti/ti_class_loader.cc
index e81e4bc..b551b55 100644
--- a/openjdkjvmti/ti_class_loader.cc
+++ b/openjdkjvmti/ti_class_loader.cc
@@ -51,7 +51,7 @@
 #include "mirror/class.h"
 #include "mirror/class_ext.h"
 #include "mirror/object.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "object_lock.h"
 #include "runtime.h"
 #include "transform.h"
diff --git a/openjdkjvmti/ti_method.cc b/openjdkjvmti/ti_method.cc
index 43f5447..41679da 100644
--- a/openjdkjvmti/ti_method.cc
+++ b/openjdkjvmti/ti_method.cc
@@ -47,7 +47,7 @@
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
 #include "modifiers.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "runtime_callbacks.h"
 #include "scoped_thread_state_change-inl.h"
 #include "stack.h"
diff --git a/openjdkjvmti/ti_phase.cc b/openjdkjvmti/ti_phase.cc
index 07cf31c..23df27f 100644
--- a/openjdkjvmti/ti_phase.cc
+++ b/openjdkjvmti/ti_phase.cc
@@ -34,7 +34,7 @@
 #include "art_jvmti.h"
 #include "base/macros.h"
 #include "events-inl.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "runtime.h"
 #include "runtime_callbacks.h"
 #include "scoped_thread_state_change-inl.h"
diff --git a/openjdkjvmti/ti_properties.cc b/openjdkjvmti/ti_properties.cc
index c412814..4fb3070 100644
--- a/openjdkjvmti/ti_properties.cc
+++ b/openjdkjvmti/ti_properties.cc
@@ -35,8 +35,8 @@
 #include <vector>
 
 #include "jni.h"
-#include "nativehelper/ScopedLocalRef.h"
-#include "nativehelper/ScopedUtfChars.h"
+#include "nativehelper/scoped_local_ref.h"
+#include "nativehelper/scoped_utf_chars.h"
 
 #include "art_jvmti.h"
 #include "runtime.h"
diff --git a/openjdkjvmti/ti_redefine.cc b/openjdkjvmti/ti_redefine.cc
index 53abfbc..c4f16f5 100644
--- a/openjdkjvmti/ti_redefine.cc
+++ b/openjdkjvmti/ti_redefine.cc
@@ -62,7 +62,7 @@
 #include "mirror/class-inl.h"
 #include "mirror/class_ext.h"
 #include "mirror/object.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "non_debuggable_classes.h"
 #include "object_lock.h"
 #include "runtime.h"
diff --git a/openjdkjvmti/ti_search.cc b/openjdkjvmti/ti_search.cc
index 5c67b89..fe12a25 100644
--- a/openjdkjvmti/ti_search.cc
+++ b/openjdkjvmti/ti_search.cc
@@ -44,7 +44,7 @@
 #include "mirror/class-inl.h"
 #include "mirror/object.h"
 #include "mirror/string.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "obj_ptr-inl.h"
 #include "runtime.h"
 #include "runtime_callbacks.h"
diff --git a/openjdkjvmti/ti_stack.cc b/openjdkjvmti/ti_stack.cc
index 8c4eb0b..e346e16 100644
--- a/openjdkjvmti/ti_stack.cc
+++ b/openjdkjvmti/ti_stack.cc
@@ -53,7 +53,7 @@
 #include "jni_internal.h"
 #include "mirror/class.h"
 #include "mirror/dex_cache.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "scoped_thread_state_change-inl.h"
 #include "stack.h"
 #include "ti_thread.h"
diff --git a/openjdkjvmti/ti_thread.cc b/openjdkjvmti/ti_thread.cc
index 389465d..99dea54 100644
--- a/openjdkjvmti/ti_thread.cc
+++ b/openjdkjvmti/ti_thread.cc
@@ -43,7 +43,7 @@
 #include "mirror/class.h"
 #include "mirror/object-inl.h"
 #include "mirror/string.h"
-#include "nativehelper/ScopedLocalRef.h"
+#include "nativehelper/scoped_local_ref.h"
 #include "obj_ptr.h"
 #include "runtime.h"
 #include "runtime_callbacks.h"