Lines Matching full:helper
29 //JNI Helper functions
37 static JNIHelper helper;
38 return &helper;
73 JNIHelper& helper = *GetInstance();
74 pthread_mutex_lock( &helper.mutex_ );
76 helper.activity_ = activity;
79 helper.activity_->vm->AttachCurrentThread( &env, NULL );
82 jclass android_content_Context = env->GetObjectClass( helper.activity_->clazz );
86 jstring packageName = (jstring) env->CallObjectMethod( helper.activity_->clazz,
89 helper.app_name_ = std::string( appname );
91 jclass cls = helper.RetrieveClass( env, helper_class_name );
92 helper.jni_helper_java_class_ = (jclass) env->NewGlobalRef( cls );
94 jmethodID constructor = env->GetMethodID( helper.jni_helper_java_class_, "<init>", "()V" );
95 helper.jni_helper_java_ref_ = env->NewObject( helper.jni_helper_java_class_, constructor );
96 helper.jni_helper_java_ref_ = env->NewGlobalRef( helper.jni_helper_java_ref_ );
99 helper.activity_->vm->DetachCurrentThread();
101 pthread_mutex_unlock( &helper.mutex_ );
112 LOGI( "JNIHelper has not been initialized.Call init() to initialize the helper" );
184 LOGI( "JNIHelper has not been initialized. Call init() to initialize the helper" );
212 LOGI( "JNIHelper has not been initialized. Call init() to initialize the helper" );
256 LOGI( "JNIHelper has not been initialized. Call init() to initialize the helper" );
296 LOGI( "JNIHelper has not been initialized. Call init() to initialize the helper" );
318 LOGI( "JNIHelper has not been initialized. Call init() to initialize the helper" );
360 LOGI( "JNIHelper has not been initialized. Call init() to initialize the helper" );