summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-04-24 15:09:56 -0700
committer Andreas Gampe <agampe@google.com> 2017-05-30 16:10:27 -0700
commita14100ccf51cc63a5c472188d1e2d337627e49eb (patch)
treed659a038e35fdd790b642f51e3eddbc9b51d003a
parent1171deea4cb2f2db67a310ea8797d06206b2bdea (diff)
ART: More header cleanup - jni_internal.h
Move jni_macros.h to the clients (users of RegisterNativeMethods). Test: mmma art Change-Id: I052ac9f703ec69f0a2df1efcaf9f4a450eb7be1c
-rw-r--r--runtime/jni_internal.h1
-rw-r--r--runtime/native/dalvik_system_DexFile.cc1
-rw-r--r--runtime/native/dalvik_system_VMDebug.cc2
-rw-r--r--runtime/native/dalvik_system_VMRuntime.cc1
-rw-r--r--runtime/native/dalvik_system_VMStack.cc2
-rw-r--r--runtime/native/dalvik_system_ZygoteHooks.cc1
-rw-r--r--runtime/native/java_lang_Class.cc2
-rw-r--r--runtime/native/java_lang_Object.cc2
-rw-r--r--runtime/native/java_lang_String.cc2
-rw-r--r--runtime/native/java_lang_StringFactory.cc2
-rw-r--r--runtime/native/java_lang_System.cc2
-rw-r--r--runtime/native/java_lang_Thread.cc2
-rw-r--r--runtime/native/java_lang_Throwable.cc2
-rw-r--r--runtime/native/java_lang_VMClassLoader.cc2
-rw-r--r--runtime/native/java_lang_Void.cc2
-rw-r--r--runtime/native/java_lang_invoke_MethodHandleImpl.cc2
-rw-r--r--runtime/native/java_lang_ref_FinalizerReference.cc2
-rw-r--r--runtime/native/java_lang_ref_Reference.cc2
-rw-r--r--runtime/native/java_lang_reflect_Array.cc2
-rw-r--r--runtime/native/java_lang_reflect_Constructor.cc2
-rw-r--r--runtime/native/java_lang_reflect_Executable.cc1
-rw-r--r--runtime/native/java_lang_reflect_Field.cc1
-rw-r--r--runtime/native/java_lang_reflect_Method.cc2
-rw-r--r--runtime/native/java_lang_reflect_Parameter.cc1
-rw-r--r--runtime/native/java_lang_reflect_Proxy.cc2
-rw-r--r--runtime/native/java_util_concurrent_atomic_AtomicLong.cc2
-rw-r--r--runtime/native/libcore_util_CharsetUtils.cc8
-rw-r--r--runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc2
-rw-r--r--runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc2
-rw-r--r--runtime/native/sun_misc_Unsafe.cc12
30 files changed, 62 insertions, 7 deletions
diff --git a/runtime/jni_internal.h b/runtime/jni_internal.h
index 580a42bcef..24bee6fb1d 100644
--- a/runtime/jni_internal.h
+++ b/runtime/jni_internal.h
@@ -19,7 +19,6 @@
#include <jni.h>
#include <iosfwd>
-#include "nativehelper/jni_macros.h"
#include "base/macros.h"
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index e618323e4f..870402d301 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -19,6 +19,7 @@
#include <sstream>
#include "android-base/stringprintf.h"
+#include "nativehelper/jni_macros.h"
#include "base/logging.h"
#include "base/stl_util.h"
diff --git a/runtime/native/dalvik_system_VMDebug.cc b/runtime/native/dalvik_system_VMDebug.cc
index 5c4e242e4d..bb8233b9e8 100644
--- a/runtime/native/dalvik_system_VMDebug.cc
+++ b/runtime/native/dalvik_system_VMDebug.cc
@@ -21,6 +21,8 @@
#include <sstream>
+#include "nativehelper/jni_macros.h"
+
#include "base/histogram-inl.h"
#include "base/time_utils.h"
#include "class_linker.h"
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc
index ff4d93109e..18b871cca3 100644
--- a/runtime/native/dalvik_system_VMRuntime.cc
+++ b/runtime/native/dalvik_system_VMRuntime.cc
@@ -30,6 +30,7 @@ extern "C" void android_set_application_target_sdk_version(uint32_t version);
#pragma GCC diagnostic pop
#include "android-base/stringprintf.h"
+#include "nativehelper/jni_macros.h"
#include "art_method-inl.h"
#include "arch/instruction_set.h"
diff --git a/runtime/native/dalvik_system_VMStack.cc b/runtime/native/dalvik_system_VMStack.cc
index 0dfafa4a7c..6c41d515de 100644
--- a/runtime/native/dalvik_system_VMStack.cc
+++ b/runtime/native/dalvik_system_VMStack.cc
@@ -16,6 +16,8 @@
#include "dalvik_system_VMStack.h"
+#include "nativehelper/jni_macros.h"
+
#include "art_method-inl.h"
#include "gc/task_processor.h"
#include "jni_internal.h"
diff --git a/runtime/native/dalvik_system_ZygoteHooks.cc b/runtime/native/dalvik_system_ZygoteHooks.cc
index 0515ec6339..4c6f53081a 100644
--- a/runtime/native/dalvik_system_ZygoteHooks.cc
+++ b/runtime/native/dalvik_system_ZygoteHooks.cc
@@ -19,6 +19,7 @@
#include <stdlib.h>
#include "android-base/stringprintf.h"
+#include "nativehelper/jni_macros.h"
#include "arch/instruction_set.h"
#include "art_method-inl.h"
diff --git a/runtime/native/java_lang_Class.cc b/runtime/native/java_lang_Class.cc
index 4f999471c6..9e07a5c1a4 100644
--- a/runtime/native/java_lang_Class.cc
+++ b/runtime/native/java_lang_Class.cc
@@ -18,6 +18,8 @@
#include <iostream>
+#include "nativehelper/jni_macros.h"
+
#include "art_field-inl.h"
#include "art_method-inl.h"
#include "base/enums.h"
diff --git a/runtime/native/java_lang_Object.cc b/runtime/native/java_lang_Object.cc
index fb4f99a126..c9841d1b23 100644
--- a/runtime/native/java_lang_Object.cc
+++ b/runtime/native/java_lang_Object.cc
@@ -16,6 +16,8 @@
#include "java_lang_Object.h"
+#include "nativehelper/jni_macros.h"
+
#include "jni_internal.h"
#include "mirror/object-inl.h"
#include "scoped_fast_native_object_access-inl.h"
diff --git a/runtime/native/java_lang_String.cc b/runtime/native/java_lang_String.cc
index bf33bf24a0..4928c01c96 100644
--- a/runtime/native/java_lang_String.cc
+++ b/runtime/native/java_lang_String.cc
@@ -16,6 +16,8 @@
#include "java_lang_String.h"
+#include "nativehelper/jni_macros.h"
+
#include "common_throws.h"
#include "jni_internal.h"
#include "mirror/array.h"
diff --git a/runtime/native/java_lang_StringFactory.cc b/runtime/native/java_lang_StringFactory.cc
index ec3c7c2fdf..c1292ef6c4 100644
--- a/runtime/native/java_lang_StringFactory.cc
+++ b/runtime/native/java_lang_StringFactory.cc
@@ -16,6 +16,8 @@
#include "java_lang_StringFactory.h"
+#include "nativehelper/jni_macros.h"
+
#include "common_throws.h"
#include "jni_internal.h"
#include "mirror/object-inl.h"
diff --git a/runtime/native/java_lang_System.cc b/runtime/native/java_lang_System.cc
index 2cabce8868..264b427460 100644
--- a/runtime/native/java_lang_System.cc
+++ b/runtime/native/java_lang_System.cc
@@ -16,6 +16,8 @@
#include "java_lang_System.h"
+#include "nativehelper/jni_macros.h"
+
#include "common_throws.h"
#include "gc/accounting/card_table-inl.h"
#include "jni_internal.h"
diff --git a/runtime/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc
index 346bd30b9d..f3254c4b18 100644
--- a/runtime/native/java_lang_Thread.cc
+++ b/runtime/native/java_lang_Thread.cc
@@ -16,6 +16,8 @@
#include "java_lang_Thread.h"
+#include "nativehelper/jni_macros.h"
+
#include "common_throws.h"
#include "jni_internal.h"
#include "monitor.h"
diff --git a/runtime/native/java_lang_Throwable.cc b/runtime/native/java_lang_Throwable.cc
index 654b8a8e5c..b69fbef8d8 100644
--- a/runtime/native/java_lang_Throwable.cc
+++ b/runtime/native/java_lang_Throwable.cc
@@ -16,6 +16,8 @@
#include "java_lang_Throwable.h"
+#include "nativehelper/jni_macros.h"
+
#include "jni_internal.h"
#include "scoped_fast_native_object_access-inl.h"
#include "thread.h"
diff --git a/runtime/native/java_lang_VMClassLoader.cc b/runtime/native/java_lang_VMClassLoader.cc
index 32cc98ec05..55955e7c57 100644
--- a/runtime/native/java_lang_VMClassLoader.cc
+++ b/runtime/native/java_lang_VMClassLoader.cc
@@ -16,6 +16,8 @@
#include "java_lang_VMClassLoader.h"
+#include "nativehelper/jni_macros.h"
+
#include "class_linker.h"
#include "jni_internal.h"
#include "mirror/class_loader.h"
diff --git a/runtime/native/java_lang_Void.cc b/runtime/native/java_lang_Void.cc
index e2b4b82cfb..b0d63ef222 100644
--- a/runtime/native/java_lang_Void.cc
+++ b/runtime/native/java_lang_Void.cc
@@ -16,6 +16,8 @@
#include "java_lang_Void.h"
+#include "nativehelper/jni_macros.h"
+
#include "class_linker-inl.h"
#include "jni_internal.h"
#include "runtime.h"
diff --git a/runtime/native/java_lang_invoke_MethodHandleImpl.cc b/runtime/native/java_lang_invoke_MethodHandleImpl.cc
index 9113841909..63168cec24 100644
--- a/runtime/native/java_lang_invoke_MethodHandleImpl.cc
+++ b/runtime/native/java_lang_invoke_MethodHandleImpl.cc
@@ -16,6 +16,8 @@
#include "java_lang_invoke_MethodHandleImpl.h"
+#include "nativehelper/jni_macros.h"
+
#include "art_method.h"
#include "handle_scope-inl.h"
#include "jni_internal.h"
diff --git a/runtime/native/java_lang_ref_FinalizerReference.cc b/runtime/native/java_lang_ref_FinalizerReference.cc
index afedc5e456..c75837aa96 100644
--- a/runtime/native/java_lang_ref_FinalizerReference.cc
+++ b/runtime/native/java_lang_ref_FinalizerReference.cc
@@ -16,6 +16,8 @@
#include "java_lang_ref_FinalizerReference.h"
+#include "nativehelper/jni_macros.h"
+
#include "gc/heap.h"
#include "gc/reference_processor.h"
#include "jni_internal.h"
diff --git a/runtime/native/java_lang_ref_Reference.cc b/runtime/native/java_lang_ref_Reference.cc
index b1cb2f2e70..606e656f3c 100644
--- a/runtime/native/java_lang_ref_Reference.cc
+++ b/runtime/native/java_lang_ref_Reference.cc
@@ -16,6 +16,8 @@
#include "java_lang_ref_Reference.h"
+#include "nativehelper/jni_macros.h"
+
#include "gc/heap.h"
#include "gc/reference_processor.h"
#include "jni_internal.h"
diff --git a/runtime/native/java_lang_reflect_Array.cc b/runtime/native/java_lang_reflect_Array.cc
index 54c21096d3..96623950aa 100644
--- a/runtime/native/java_lang_reflect_Array.cc
+++ b/runtime/native/java_lang_reflect_Array.cc
@@ -16,6 +16,8 @@
#include "java_lang_reflect_Array.h"
+#include "nativehelper/jni_macros.h"
+
#include "class_linker-inl.h"
#include "common_throws.h"
#include "dex_file-inl.h"
diff --git a/runtime/native/java_lang_reflect_Constructor.cc b/runtime/native/java_lang_reflect_Constructor.cc
index fb780463ff..d1953adacf 100644
--- a/runtime/native/java_lang_reflect_Constructor.cc
+++ b/runtime/native/java_lang_reflect_Constructor.cc
@@ -16,6 +16,8 @@
#include "java_lang_reflect_Constructor.h"
+#include "nativehelper/jni_macros.h"
+
#include "art_method-inl.h"
#include "base/enums.h"
#include "class_linker.h"
diff --git a/runtime/native/java_lang_reflect_Executable.cc b/runtime/native/java_lang_reflect_Executable.cc
index 8f226ce621..256a3d04de 100644
--- a/runtime/native/java_lang_reflect_Executable.cc
+++ b/runtime/native/java_lang_reflect_Executable.cc
@@ -17,6 +17,7 @@
#include "java_lang_reflect_Executable.h"
#include "android-base/stringprintf.h"
+#include "nativehelper/jni_macros.h"
#include "art_method-inl.h"
#include "dex_file_annotations.h"
diff --git a/runtime/native/java_lang_reflect_Field.cc b/runtime/native/java_lang_reflect_Field.cc
index 0fb3903641..e38bcd691a 100644
--- a/runtime/native/java_lang_reflect_Field.cc
+++ b/runtime/native/java_lang_reflect_Field.cc
@@ -17,6 +17,7 @@
#include "java_lang_reflect_Field.h"
#include "android-base/stringprintf.h"
+#include "nativehelper/jni_macros.h"
#include "art_field-inl.h"
#include "class_linker.h"
diff --git a/runtime/native/java_lang_reflect_Method.cc b/runtime/native/java_lang_reflect_Method.cc
index 6f0130eb15..c9e8dba551 100644
--- a/runtime/native/java_lang_reflect_Method.cc
+++ b/runtime/native/java_lang_reflect_Method.cc
@@ -16,6 +16,8 @@
#include "java_lang_reflect_Method.h"
+#include "nativehelper/jni_macros.h"
+
#include "art_method-inl.h"
#include "base/enums.h"
#include "class_linker.h"
diff --git a/runtime/native/java_lang_reflect_Parameter.cc b/runtime/native/java_lang_reflect_Parameter.cc
index 37aa16c3df..92a7ac9836 100644
--- a/runtime/native/java_lang_reflect_Parameter.cc
+++ b/runtime/native/java_lang_reflect_Parameter.cc
@@ -17,6 +17,7 @@
#include "java_lang_reflect_Parameter.h"
#include "android-base/stringprintf.h"
+#include "nativehelper/jni_macros.h"
#include "art_method-inl.h"
#include "common_throws.h"
diff --git a/runtime/native/java_lang_reflect_Proxy.cc b/runtime/native/java_lang_reflect_Proxy.cc
index 0279b5f9ce..518aaa7317 100644
--- a/runtime/native/java_lang_reflect_Proxy.cc
+++ b/runtime/native/java_lang_reflect_Proxy.cc
@@ -16,6 +16,8 @@
#include "java_lang_reflect_Proxy.h"
+#include "nativehelper/jni_macros.h"
+
#include "class_linker.h"
#include "jni_internal.h"
#include "mirror/class_loader.h"
diff --git a/runtime/native/java_util_concurrent_atomic_AtomicLong.cc b/runtime/native/java_util_concurrent_atomic_AtomicLong.cc
index 4d2ea6794c..101f386ff8 100644
--- a/runtime/native/java_util_concurrent_atomic_AtomicLong.cc
+++ b/runtime/native/java_util_concurrent_atomic_AtomicLong.cc
@@ -16,6 +16,8 @@
#include "java_util_concurrent_atomic_AtomicLong.h"
+#include "nativehelper/jni_macros.h"
+
#include "arch/instruction_set.h"
#include "atomic.h"
#include "jni_internal.h"
diff --git a/runtime/native/libcore_util_CharsetUtils.cc b/runtime/native/libcore_util_CharsetUtils.cc
index 4138ccc879..c388ea1438 100644
--- a/runtime/native/libcore_util_CharsetUtils.cc
+++ b/runtime/native/libcore_util_CharsetUtils.cc
@@ -14,15 +14,19 @@
* limitations under the License.
*/
+#include "libcore_util_CharsetUtils.h"
+
+#include <string.h>
+
+#include "nativehelper/jni_macros.h"
+
#include "jni_internal.h"
#include "mirror/string.h"
#include "mirror/string-inl.h"
-#include "native/libcore_util_CharsetUtils.h"
#include "scoped_fast_native_object_access-inl.h"
#include "ScopedPrimitiveArray.h"
#include "unicode/utf16.h"
-#include <string.h>
namespace art {
diff --git a/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
index 5809708d64..a860977c4c 100644
--- a/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
+++ b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
@@ -16,6 +16,8 @@
#include "org_apache_harmony_dalvik_ddmc_DdmServer.h"
+#include "nativehelper/jni_macros.h"
+
#include "base/logging.h"
#include "debugger.h"
#include "jni_internal.h"
diff --git a/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
index 69ef59eb30..ac504ccaf6 100644
--- a/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
+++ b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
@@ -16,6 +16,8 @@
#include "org_apache_harmony_dalvik_ddmc_DdmVmInternal.h"
+#include "nativehelper/jni_macros.h"
+
#include "base/logging.h"
#include "base/mutex.h"
#include "debugger.h"
diff --git a/runtime/native/sun_misc_Unsafe.cc b/runtime/native/sun_misc_Unsafe.cc
index cc5a41a0de..b42cedfaf0 100644
--- a/runtime/native/sun_misc_Unsafe.cc
+++ b/runtime/native/sun_misc_Unsafe.cc
@@ -15,6 +15,14 @@
*/
#include "sun_misc_Unsafe.h"
+
+#include <atomic>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "nativehelper/jni_macros.h"
+
#include "common_throws.h"
#include "gc/accounting/card_table-inl.h"
#include "jni_internal.h"
@@ -23,10 +31,6 @@
#include "mirror/object-inl.h"
#include "scoped_fast_native_object_access-inl.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <atomic>
namespace art {