aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/jni_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'native/jni/jni_common.cpp')
-rw-r--r--native/jni/jni_common.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/native/jni/jni_common.cpp b/native/jni/jni_common.cpp
index 8643f723f..85d26836a 100644
--- a/native/jni/jni_common.cpp
+++ b/native/jni/jni_common.cpp
@@ -32,22 +32,22 @@ using namespace latinime;
* Returns the JNI version on success, -1 on failure.
*/
jint JNI_OnLoad(JavaVM* vm, void* reserved) {
- JNIEnv* env = NULL;
+ JNIEnv* env = 0;
jint result = -1;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("ERROR: GetEnv failed");
+ AKLOGE("ERROR: GetEnv failed");
goto bail;
}
- assert(env != NULL);
+ assert(env != 0);
if (!register_BinaryDictionary(env)) {
- LOGE("ERROR: BinaryDictionary native registration failed");
+ AKLOGE("ERROR: BinaryDictionary native registration failed");
goto bail;
}
if (!register_ProximityInfo(env)) {
- LOGE("ERROR: ProximityInfo native registration failed");
+ AKLOGE("ERROR: ProximityInfo native registration failed");
goto bail;
}
@@ -63,12 +63,12 @@ namespace latinime {
int registerNativeMethods(JNIEnv* env, const char* className, JNINativeMethod* methods,
int numMethods) {
jclass clazz = env->FindClass(className);
- if (clazz == NULL) {
- LOGE("Native registration unable to find class '%s'", className);
+ if (clazz == 0) {
+ AKLOGE("Native registration unable to find class '%s'", className);
return JNI_FALSE;
}
if (env->RegisterNatives(clazz, methods, numMethods) < 0) {
- LOGE("RegisterNatives failed for '%s'", className);
+ AKLOGE("RegisterNatives failed for '%s'", className);
env->DeleteLocalRef(clazz);
return JNI_FALSE;
}