void ZFImpl_sys_Android_stackTracePrint(void) { JNIEnv *jniEnv = JNIGetJNIEnv(); jclass jcls = JNIUtilFindClass(jniEnv, JNIConvertClassNameForFindClass(ZFImpl_sys_Android_JNI_NAME_ZFAndroidLog).c_str()); static jmethodID jmId = JNIUtilGetStaticMethodID(jniEnv, jcls, zfTextA("stackTracePrint"), JNIGetMethodSig(JNIType::S_void, JNIParamTypeContainer() ).c_str()); JNIUtilCallStaticVoidMethod(jniEnv, jcls, jmId); }
virtual void timerStop(ZF_IN ZFTimer *timer) { JNIEnv *jniEnv = JNIGetJNIEnv(); static jmethodID jmId = JNIUtilGetStaticMethodID(jniEnv, this->jclsOwner, zfTextA("native_timerStop"), JNIGetMethodSig(JNIType::S_void, JNIParamTypeContainer() .add(JNIType::S_object(ZFImpl_sys_Android_JNI_NAME_Object)) ).c_str()); JNIUtilCallStaticVoidMethod(jniEnv, this->jclsOwner, jmId, ZFCastStatic(jobject, timer->nativeTimer())); }
virtual void *nativeTimerCreate(ZF_IN ZFTimer *timer) { JNIEnv *jniEnv = JNIGetJNIEnv(); static jmethodID jmId = JNIUtilGetStaticMethodID(jniEnv, this->jclsOwner, zfTextA("native_nativeTimerCreate"), JNIGetMethodSig(JNIType::S_object(ZFImpl_sys_Android_JNI_NAME_Object), JNIParamTypeContainer() ).c_str()); jobject tmp = JNIUtilCallStaticObjectMethod(jniEnv, this->jclsOwner, jmId); jobject ret = JNIUtilNewGlobalRef(jniEnv, tmp); JNIUtilDeleteLocalRef(jniEnv, tmp); return ret; }
_ZFP_ZFObjectMutexImpl_sys_Android_MutexImpl(ZF_IN jclass jclsOwner) : ZFObjectMutexImpl() , jclsOwner(jclsOwner) , nativeMutex(NULL) { JNIEnv *jniEnv = JNIGetJNIEnv(); static jmethodID jmId = JNIUtilGetStaticMethodID(jniEnv, this->jclsOwner, zfTextA("native_nativeMutexCreate"), JNIGetMethodSig(JNIType::S_object(ZFImpl_sys_Android_JNI_NAME_Object), JNIParamTypeContainer() ).c_str()); jobject tmp = JNIUtilCallStaticObjectMethod(jniEnv, this->jclsOwner, jmId); this->nativeMutex = JNIUtilNewGlobalRef(jniEnv, tmp); JNIUtilDeleteLocalRef(jniEnv, tmp); }
zfstring ZFImpl_sys_Android_objectInfo(ZF_IN jobject nativeObject) { JNIEnv *jniEnv = JNIGetJNIEnv(); jclass jcls = JNIUtilFindClass(jniEnv, JNIConvertClassNameForFindClass(ZFImpl_sys_Android_JNI_NAME_ZFAndroidLog).c_str()); static jmethodID jmId = JNIUtilGetStaticMethodID(jniEnv, jcls, zfTextA("objectInfo"), JNIGetMethodSig(JNIType::S_object(ZFImpl_sys_Android_JNI_NAME_String), JNIParamTypeContainer() .add(JNIType::S_object(ZFImpl_sys_Android_JNI_NAME_Object)) ).c_str()); jstring tmp = ZFCastStatic(jstring, JNIUtilCallStaticObjectMethod(jniEnv, jcls, jmId, nativeObject)); const char *utf = JNIUtilGetStringUTFChars(jniEnv, tmp, zfnull); zfstring ret = utf; JNIUtilReleaseStringUTFChars(jniEnv, tmp, utf); return ret; }
zfstring ZFImpl_sys_Android_stackTrace(void) { JNIEnv *jniEnv = JNIGetJNIEnv(); jclass jcls = JNIUtilFindClass(jniEnv, JNIConvertClassNameForFindClass(ZFImpl_sys_Android_JNI_NAME_ZFAndroidLog).c_str()); static jmethodID jmId = JNIUtilGetStaticMethodID(jniEnv, jcls, zfTextA("stackTrace"), JNIGetMethodSig(JNIType::S_object(ZFImpl_sys_Android_JNI_NAME_String), JNIParamTypeContainer() ).c_str()); jstring jobjString = ZFCastStatic(jstring, JNIUtilCallStaticObjectMethod(jniEnv, jcls, jmId)); const char *utf = JNIUtilGetStringUTFChars(jniEnv, jobjString, zfnull); zfstring ret; if(utf != zfnull) { ret = utf; } JNIUtilReleaseStringUTFChars(jniEnv, jobjString, utf); return ret; }
virtual void timerStart(ZF_IN ZFTimer *timer) { JNIEnv *jniEnv = JNIGetJNIEnv(); static jmethodID jmId = JNIUtilGetStaticMethodID(jniEnv, this->jclsOwner, zfTextA("native_timerStart"), JNIGetMethodSig(JNIType::S_void, JNIParamTypeContainer() .add(JNIType::S_object(ZFImpl_sys_Android_JNI_NAME_Object)) .add(JNIPointerJNIType) .add(JNIType::S_long) .add(JNIType::S_long) .add(JNIType::S_boolean) ).c_str()); JNIUtilCallStaticVoidMethod(jniEnv, this->jclsOwner, jmId, ZFCastStatic(jobject, timer->nativeTimer()), JNIConvertZFObjectToJNIType(jniEnv, timer), timer->timerDelay(), timer->timerInterval(), timer->timerActivateInMainThread()); }