Lines Matching refs:helper
37 static JNIHelper helper; in GetInstance() local
38 return &helper; in GetInstance()
73 JNIHelper& helper = *GetInstance(); in Init() local
74 pthread_mutex_lock( &helper.mutex_ ); in Init()
76 helper.activity_ = activity; in Init()
79 helper.activity_->vm->AttachCurrentThread( &env, NULL ); in Init()
82 jclass android_content_Context = env->GetObjectClass( helper.activity_->clazz ); in Init()
86 jstring packageName = (jstring) env->CallObjectMethod( helper.activity_->clazz, in Init()
89 helper.app_name_ = std::string( appname ); in Init()
91 jclass cls = helper.RetrieveClass( env, helper_class_name ); in Init()
92 helper.jni_helper_java_class_ = (jclass) env->NewGlobalRef( cls ); in Init()
94 jmethodID constructor = env->GetMethodID( helper.jni_helper_java_class_, "<init>", "()V" ); in Init()
95 helper.jni_helper_java_ref_ = env->NewObject( helper.jni_helper_java_class_, constructor ); in Init()
96 helper.jni_helper_java_ref_ = env->NewGlobalRef( helper.jni_helper_java_ref_ ); in Init()
99 helper.activity_->vm->DetachCurrentThread(); in Init()
101 pthread_mutex_unlock( &helper.mutex_ ); in Init()