Index: base/android/jni_android.h |
diff --git a/base/android/jni_android.h b/base/android/jni_android.h |
index 492f11ff90bbcafbd70a8a8f659287eddd94d23a..40e235943c64b88e04a1bd16166f107c81c574cf 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, |
+ 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,11 @@ 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, |