@@ -113,19 +113,19 @@ static int registerNativeMethods(JNIEnv* env, const char* className,
113113 jclass clazz=env->FindClass (className);
114114 if (clazz == NULL )
115115 {
116- // __android_log_print(ANDROID_LOG_FATAL,"Qt", "Native registration unable to find class '%s'", className);
116+ __android_log_print (ANDROID_LOG_FATAL," Qt" , " Native registration unable to find class '%s'" , className);
117117 return JNI_FALSE;
118118 }
119119 jmethodID constr = env->GetMethodID (clazz, " <init>" , " ()V" );
120120 if (!constr) {
121- // __android_log_print(ANDROID_LOG_FATAL,"Qt", "Native registration unable to find constructor for class '%s'", className);
121+ __android_log_print (ANDROID_LOG_FATAL," Qt" , " Native registration unable to find constructor for class '%s'" , className);
122122 return JNI_FALSE;;
123123 }
124124 jobject obj = env->NewObject (clazz, constr);
125125 objptr = env->NewGlobalRef (obj);
126126 if (env->RegisterNatives (clazz, gMethods , numMethods) < 0 )
127127 {
128- // __android_log_print(ANDROID_LOG_FATAL,"Qt", "RegisterNatives failed for '%s'", className);
128+ __android_log_print (ANDROID_LOG_FATAL," Qt" , " RegisterNatives failed for '%s'" , className);
129129 return JNI_FALSE;
130130 }
131131 return JNI_TRUE;
@@ -149,22 +149,23 @@ typedef union {
149149
150150Q_DECL_EXPORT jint JNICALL JNI_OnLoad (JavaVM* vm, void * /* reserved*/ )
151151{
152- // __android_log_print(ANDROID_LOG_INFO,"Qt", "qt start");
152+ __android_log_print (ANDROID_LOG_INFO," Qt" , " qt start" );
153153 UnionJNIEnvToVoid uenv;
154154 uenv.venv = NULL ;
155155 m_javaVM = 0 ;
156156
157157 if (vm->GetEnv (&uenv.venv , JNI_VERSION_1_4) != JNI_OK)
158158 {
159- // __android_log_print(ANDROID_LOG_FATAL,"Qt","GetEnv failed");
159+ __android_log_print (ANDROID_LOG_FATAL," Qt" ," GetEnv failed" );
160160 return -1 ;
161161 }
162162 m_env = uenv.nativeEnvironment ;
163163 if (!registerNatives (m_env))
164164 {
165- // __android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed");
165+ __android_log_print (ANDROID_LOG_FATAL, " Qt" , " registerNatives failed" );
166166 return -1 ;
167167 }
168168 m_javaVM = vm;
169+ __android_log_print (ANDROID_LOG_INFO," Qt" , " JNI OK" );
169170 return JNI_VERSION_1_4;
170171}
0 commit comments