diff options
author | William Escande <wescande@google.com> | 2023-11-24 05:18:21 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-11-24 05:18:21 +0000 |
commit | 3b3531fdc000b10c7648a900bf322eade6f40e1c (patch) | |
tree | 9542bc13b08234984cf9dac5605b0c9d99352850 | |
parent | f451d48649cc8ce740f270107f72931992fbedc5 (diff) | |
parent | 1177d560c49443937c1dae2484d8bee89e2d5c9e (diff) | |
download | modules-utils-3b3531fdc000b10c7648a900bf322eade6f40e1c.tar.gz |
Merge "Pass expresslog class as parameter" into main
-rw-r--r-- | jni/expresslog/com_android_modules_expresslog_Utils.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/jni/expresslog/com_android_modules_expresslog_Utils.cpp b/jni/expresslog/com_android_modules_expresslog_Utils.cpp index 973d946..ed4d0ed 100644 --- a/jni/expresslog/com_android_modules_expresslog_Utils.cpp +++ b/jni/expresslog/com_android_modules_expresslog_Utils.cpp @@ -48,13 +48,12 @@ static const JNINativeMethod gMethods[] = { namespace android { -int register_com_android_modules_expresslog_Utils(JNIEnv* env) { - static const char* const kUtilsClassName = "com/android/modules/expresslog/Utils"; +int register_com_android_modules_expresslog_Utils(JNIEnv* env, const char* const utilsClassName) { static const char* const kStringClassName = "java/lang/String"; - ScopedLocalRef<jclass> utilsCls(env, env->FindClass(kUtilsClassName)); + ScopedLocalRef<jclass> utilsCls(env, env->FindClass(utilsClassName)); if (utilsCls.get() == nullptr) { - ALOGE("jni expresslog registration failure, class not found '%s'", kUtilsClassName); + ALOGE("jni expresslog registration failure, class not found '%s'", utilsClassName); return JNI_ERR; } @@ -78,4 +77,9 @@ int register_com_android_modules_expresslog_Utils(JNIEnv* env) { return JNI_VERSION_1_4; } +int register_com_android_modules_expresslog_Utils(JNIEnv* env) { + static const char* const kUtilsClassName = "com/android/modules/expresslog/Utils"; + return register_com_android_modules_expresslog_Utils(env, kUtilsClassName); +} + } // namespace android |