Index: base/android/jni_android.h |
diff --git a/base/android/jni_android.h b/base/android/jni_android.h |
index 492f11ff90bbcafbd70a8a8f659287eddd94d23a..18ec3d7de96175b4398e0c962d9aaee21b4b96c0 100644 |
--- a/base/android/jni_android.h |
+++ b/base/android/jni_android.h |
@@ -71,6 +71,12 @@ jmethodID GetMethodID(JNIEnv* env, |
const char* method_name, |
const char* jni_signature); |
+// Unlike GetMethodID, returns NULL if the method could not be found. |
+jmethodID GetMethodIDOrNULL(JNIEnv* env, |
Sami
2012/10/01 11:32:15
Nit: GetMethodIDOrNull would be more consistent wi
bulach
2012/10/01 15:08:37
Done.
|
+ jclass clazz, |
+ const char* method_name, |
+ const char* jni_signature); |
+ |
// Returns the method ID for the static method with the specified name and |
// signature. |
// This method triggers a fatal assertion if the method could not be found. |
@@ -86,6 +92,12 @@ jmethodID GetStaticMethodID(JNIEnv* env, |
const char* method_name, |
const char* jni_signature); |
+// Unlike GetStaticMethodID, returns NULL if the method could not be found. |
+jmethodID GetStaticMethodIDOrNULL(JNIEnv* env, |
+ jclass clazz, |
+ const char* method_name, |
+ const char* jni_signature); |
+ |
// Returns true iff |clazz| has a method with the specified name and signature. |
bool HasMethod(JNIEnv* env, |