Move JNIHelp to a C implementation
Completes the move to C for libnativehelper.
Reduces the size of libnativehelper_compat_c++.so as it
no longer statically links against lbc++:
arm 125kB -> 14kB
arm8 181kB -> 20kB
x86 172kB -> 16kB
x86_64 180kB -> 18kB
Marginal reduction in the size of libnativehelper.so.
Bug: 151443957
Test: m && boot
Test: ExpandableString_test
Change-Id: I562897337901131d3f855b66307bb2a12c04d477
diff --git a/JniConstants.h b/JniConstants.h
index 0d782d7..aa66e25 100644
--- a/JniConstants.h
+++ b/JniConstants.h
@@ -22,17 +22,21 @@
__BEGIN_DECLS
+
//
// Classes in constants cache.
//
// NB The implementations of these methods are generated by the JCLASS_ACCESSOR_IMPL macro in
// JniConstants.c.
//
+jclass JniConstants_ClassClass(JNIEnv* env);
jclass JniConstants_FileDescriptorClass(JNIEnv* env);
jclass JniConstants_NIOAccessClass(JNIEnv* env);
jclass JniConstants_NioBufferClass(JNIEnv* env);
jclass JniConstants_ReferenceClass(JNIEnv* env);
jclass JniConstants_StringClass(JNIEnv* env);
+jclass JniConstants_ThrowableClass(JNIEnv* env);
+
//
// Methods in the constants cache.
@@ -41,11 +45,14 @@
// JniConstants.c.
//
jmethodID JniConstants_FileDescriptor_init(JNIEnv* env);
+jmethodID JniConstants_Class_getName();
jmethodID JniConstants_NIOAccess_getBaseArray(JNIEnv* env);
jmethodID JniConstants_NIOAccess_getBaseArrayOffset(JNIEnv* env);
jmethodID JniConstants_NioBuffer_array(JNIEnv* env);
jmethodID JniConstants_NioBuffer_arrayOffset(JNIEnv* env);
jmethodID JniConstants_Reference_get(JNIEnv* env);
+jmethodID JniConstants_Throwable_getMessage(JNIEnv* env);
+jmethodID JniConstants_Throwable_printStackTrace(JNIEnv* env);
//
// Fields in the constants cache.