| Index: base/android/jni_generator/jni_generator_helper.h
|
| diff --git a/base/android/jni_generator/jni_generator_helper.h b/base/android/jni_generator/jni_generator_helper.h
|
| index 4c159c03a9f3975b08b487821a1839185918017b..aefbb561484c59fe220abb4cd238f6ff2af034b4 100644
|
| --- a/base/android/jni_generator/jni_generator_helper.h
|
| +++ b/base/android/jni_generator/jni_generator_helper.h
|
| @@ -8,6 +8,7 @@
|
| #include <jni.h>
|
|
|
| #include "base/android/jni_android.h"
|
| +#include "base/android/library_loader/library_loader_hooks.h"
|
| #include "base/android/scoped_java_ref.h"
|
| #include "base/logging.h"
|
| #include "build/build_config.h"
|
| @@ -42,6 +43,22 @@ inline void CheckException(JNIEnv* env) {
|
| base::android::CheckException(env);
|
| }
|
|
|
| +inline bool ShouldSkipJniRegistration(bool is_maindex_class) {
|
| + base::android::JniRegistrationType jni_type =
|
| + base::android::GetJniRegistrationType();
|
| + if (jni_type == base::android::NO_JNI_REGISTRATION) {
|
| + // TODO(estevenson): Change this to a DCHECK.
|
| + return true;
|
| + } else if (jni_type == base::android::ALL_JNI_REGISTRATION) {
|
| + return false;
|
| + } else if (jni_type == base::android::SELECTIVE_JNI_REGISTRATION) {
|
| + return !is_maindex_class;
|
| + } else {
|
| + NOTREACHED();
|
| + return false;
|
| + }
|
| +}
|
| +
|
| } // namespace jni_generator
|
|
|
| #endif // BASE_ANDROID_JNI_GENERATOR_JNI_GENERATOR_HELPER_H_
|
|
|