Home
last modified time | relevance | path

Searched refs:env (Results 1 – 25 of 48) sorted by relevance

12

/packages/inputmethods/PinyinIME/jni/android/
Dcom_android_inputmethod_pinyin_PinyinDecoderService.cpp48 JNIEXPORT jboolean JNICALL nativeImOpenDecoder(JNIEnv* env, jclass jclazz, in nativeImOpenDecoder() argument
51 jbyte *fsd = (*env).GetByteArrayElements(fn_sys_dict, 0); in nativeImOpenDecoder()
52 jbyte *fud = (*env).GetByteArrayElements(fn_usr_dict, 0); in nativeImOpenDecoder()
59 (*env).ReleaseByteArrayElements(fn_sys_dict, fsd, 0); in nativeImOpenDecoder()
60 (*env).ReleaseByteArrayElements(fn_usr_dict, fud, 0); in nativeImOpenDecoder()
65 JNIEXPORT jboolean JNICALL nativeImOpenDecoderFd(JNIEnv* env, jclass jclazz, in nativeImOpenDecoderFd() argument
70 jint fd = env->GetIntField(fd_sys_dict, gFileDescriptorOffsets.mDescriptor); in nativeImOpenDecoderFd()
71 jbyte *fud = (*env).GetByteArrayElements(fn_usr_dict, 0); in nativeImOpenDecoderFd()
81 (*env).ReleaseByteArrayElements(fn_usr_dict, fud, 0); in nativeImOpenDecoderFd()
86 JNIEXPORT void JNICALL nativeImSetMaxLens(JNIEnv* env, jclass jclazz, in nativeImSetMaxLens() argument
[all …]
/packages/inputmethods/LatinIME/native/jni/
Dcom_android_inputmethod_latin_BinaryDictionary.cpp46 static jlong latinime_BinaryDictionary_open(JNIEnv *env, jobject object, in latinime_BinaryDictionary_open() argument
52 const jsize sourceDirUtf8Length = env->GetStringUTFLength(sourceDir); in latinime_BinaryDictionary_open()
58 env->GetStringUTFRegion(sourceDir, 0, env->GetStringLength(sourceDir), sourceDirChars); in latinime_BinaryDictionary_open()
131 static int latinime_BinaryDictionary_getSuggestions(JNIEnv *env, jobject object, jlong dict, in latinime_BinaryDictionary_getSuggestions() argument
148 const jsize inputCodePointsLength = env->GetArrayLength(inputCodePointsArray); in latinime_BinaryDictionary_getSuggestions()
151 prevWordCodePointsForBigrams ? env->GetArrayLength(prevWordCodePointsForBigrams) : 0; in latinime_BinaryDictionary_getSuggestions()
154 env->GetIntArrayRegion(xCoordinatesArray, 0, arraySize, xCoordinates); in latinime_BinaryDictionary_getSuggestions()
155 env->GetIntArrayRegion(yCoordinatesArray, 0, arraySize, yCoordinates); in latinime_BinaryDictionary_getSuggestions()
156 env->GetIntArrayRegion(timesArray, 0, arraySize, times); in latinime_BinaryDictionary_getSuggestions()
157 env->GetIntArrayRegion(pointerIdsArray, 0, arraySize, pointerIds); in latinime_BinaryDictionary_getSuggestions()
[all …]
Djni_common.cpp34 JNIEnv *env = 0; in JNI_OnLoad() local
37 if (vm->GetEnv(reinterpret_cast<void **>(&env), JNI_VERSION_1_6) != JNI_OK) { in JNI_OnLoad()
41 assert(env); in JNI_OnLoad()
43 if (!register_BinaryDictionary(env)) { in JNI_OnLoad()
48 if (!register_DicTraverseSession(env)) { in JNI_OnLoad()
53 if (!register_ProximityInfo(env)) { in JNI_OnLoad()
67 int registerNativeMethods(JNIEnv *env, const char *className, JNINativeMethod *methods, in registerNativeMethods() argument
69 jclass clazz = env->FindClass(className); in registerNativeMethods()
74 if (env->RegisterNatives(clazz, methods, numMethods) < 0) { in registerNativeMethods()
76 env->DeleteLocalRef(clazz); in registerNativeMethods()
[all …]
Dcom_android_inputmethod_latin_DicTraverseSession.cpp26 static jlong latinime_setDicTraverseSession(JNIEnv *env, jobject object, jstring localeJStr) { in latinime_setDicTraverseSession() argument
27 void *traverseSession = DicTraverseWrapper::getDicTraverseSession(env, localeJStr); in latinime_setDicTraverseSession()
31 static void latinime_initDicTraverseSession(JNIEnv *env, jobject object, jlong traverseSession, in latinime_initDicTraverseSession() argument
40 env->GetIntArrayRegion(previousWord, 0, previousWordLength, prevWord); in latinime_initDicTraverseSession()
44 static void latinime_releaseDicTraverseSession(JNIEnv *env, jobject object, jlong traverseSession) { in latinime_releaseDicTraverseSession() argument
58 int register_DicTraverseSession(JNIEnv *env) { in register_DicTraverseSession() argument
60 return registerNativeMethods(env, kClassPathName, sMethods, in register_DicTraverseSession()
Dcom_android_inputmethod_keyboard_ProximityInfo.cpp26 static jlong latinime_Keyboard_setProximityInfo(JNIEnv *env, jobject object, in latinime_Keyboard_setProximityInfo() argument
32 ProximityInfo *proximityInfo = new ProximityInfo(env, localeJStr, maxProximityCharsSize, in latinime_Keyboard_setProximityInfo()
39 static void latinime_Keyboard_release(JNIEnv *env, jobject object, jlong proximityInfo) { in latinime_Keyboard_release() argument
50 int register_ProximityInfo(JNIEnv *env) { in register_ProximityInfo() argument
52 return registerNativeMethods(env, kClassPathName, sKeyboardMethods, in register_ProximityInfo()
/packages/apps/Bluetooth/jni/
Dcom_android_bluetooth_hfp.cpp65 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
66 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; in checkCallbackThread()
219 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
227 env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); in classInitNative()
228 method_onAudioStateChanged = env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); in classInitNative()
229 method_onVrStateChanged = env->GetMethodID(clazz, "onVrStateChanged", "(I)V"); in classInitNative()
230 method_onAnswerCall = env->GetMethodID(clazz, "onAnswerCall", "()V"); in classInitNative()
231 method_onHangupCall = env->GetMethodID(clazz, "onHangupCall", "()V"); in classInitNative()
232 method_onVolumeChanged = env->GetMethodID(clazz, "onVolumeChanged", "(II)V"); in classInitNative()
233 method_onDialCall = env->GetMethodID(clazz, "onDialCall", "(Ljava/lang/String;)V"); in classInitNative()
[all …]
Dcom_android_bluetooth_hid.cpp54 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
55 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; in checkCallbackThread()
145 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
150 method_onConnectStateChanged = env->GetMethodID(clazz, "onConnectStateChanged", "([BI)V"); in classInitNative()
151 method_onGetProtocolMode = env->GetMethodID(clazz, "onGetProtocolMode", "([BI)V"); in classInitNative()
152 method_onVirtualUnplug = env->GetMethodID(clazz, "onVirtualUnplug", "([BI)V"); in classInitNative()
178 static void initializeNative(JNIEnv *env, jobject object) { in initializeNative() argument
195 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
214 mCallbacksObj = env->NewGlobalRef(object); in initializeNative()
217 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
[all …]
Dcom_android_bluetooth_btservice_AdapterService.cpp60 void checkAndClearExceptionFromCallback(JNIEnv* env, in checkAndClearExceptionFromCallback() argument
62 if (env->ExceptionCheck()) { in checkAndClearExceptionFromCallback()
64 LOGE_EX(env); in checkAndClearExceptionFromCallback()
65 env->ExceptionClear(); in checkAndClearExceptionFromCallback()
70 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
71 if (callbackEnv != env || callbackEnv == NULL) { in checkCallbackThread()
72 ALOGE("Callback env check fail: env: %p, callback: %p", env, callbackEnv); in checkCallbackThread()
460 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
465 env->FindClass("com/android/bluetooth/btservice/JniCallbacks"); in classInitNative()
466 sJniCallbacksField = env->GetFieldID(clazz, "mJniCallbacks", in classInitNative()
[all …]
Dcom_android_bluetooth_a2dp.cpp45 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
46 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; in checkCallbackThread()
102 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
108 env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); in classInitNative()
111 env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); in classInitNative()
137 static void initNative(JNIEnv *env, jobject object) { in initNative() argument
154 env->DeleteGlobalRef(mCallbacksObj); in initNative()
170 mCallbacksObj = env->NewGlobalRef(object); in initNative()
173 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
188 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
[all …]
Dcom_android_bluetooth_hdp.cpp46 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
47 if (sCallbackEnv != env || sCallbackEnv == NULL) { in checkCallbackThread()
48 ALOGE("Callback env check fail: env: %p, callback: %p", env, sCallbackEnv); in checkCallbackThread()
100 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
105 method_onAppRegistrationState = env->GetMethodID(clazz, "onAppRegistrationState", "(II)V"); in classInitNative()
106 method_onChannelStateChanged = env->GetMethodID(clazz, "onChannelStateChanged", in classInitNative()
133 static void initializeNative(JNIEnv *env, jobject object) { in initializeNative() argument
150 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
166 mCallbacksObj = env->NewGlobalRef(object); in initializeNative()
169 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
[all …]
Dcom_android_bluetooth_pan.cpp54 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
55 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; in checkCallbackThread()
96 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
100 method_onConnectStateChanged = env->GetMethodID(clazz, "onConnectStateChanged", in classInitNative()
102 method_onControlStateChanged = env->GetMethodID(clazz, "onControlStateChanged", in classInitNative()
109 static void initializeNative(JNIEnv *env, jobject object) { in initializeNative() argument
127 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
144 mCallbacksObj = env->NewGlobalRef(object); in initializeNative()
147 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
159 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
[all …]
Dcom_android_bluetooth.h27 void checkAndClearExceptionFromCallback(JNIEnv* env,
34 int register_com_android_bluetooth_hfp(JNIEnv* env);
36 int register_com_android_bluetooth_a2dp(JNIEnv* env);
38 int register_com_android_bluetooth_hid(JNIEnv* env);
40 int register_com_android_bluetooth_hdp(JNIEnv* env);
42 int register_com_android_bluetooth_pan(JNIEnv* env);
/packages/apps/Gallery2/jni/filters/
Dgradient.c27 redGradientArray = (*env)->GetIntArrayElements(env, redGradient, NULL); in JNIFUNCF()
29 greenGradientArray = (*env)->GetIntArrayElements(env, greenGradient, NULL); in JNIFUNCF()
31 blueGradientArray = (*env)->GetIntArrayElements(env, blueGradient, NULL); in JNIFUNCF()
33 AndroidBitmap_lockPixels(env, bitmap, (void**) &destination); in JNIFUNCF()
58 (*env)->ReleaseIntArrayElements(env, redGradient, redGradientArray, 0); in JNIFUNCF()
60 (*env)->ReleaseIntArrayElements(env, greenGradient, greenGradientArray, 0); in JNIFUNCF()
62 (*env)->ReleaseIntArrayElements(env, blueGradient, blueGradientArray, 0); in JNIFUNCF()
63 AndroidBitmap_unlockPixels(env, bitmap); in JNIFUNCF()
Dredeye.c23 AndroidBitmap_lockPixels(env, bitmap, (void**) &destination); in JNIFUNCF()
25 short* rect = (*env)->GetShortArrayElements(env, vrect,0); in JNIFUNCF()
29 (*env)->ReleaseShortArrayElements(env, vrect, rect, 0); in JNIFUNCF()
30 AndroidBitmap_unlockPixels(env, bitmap); in JNIFUNCF()
Dgeometry.c136 AndroidBitmap_lockPixels(env, src, (void**) &source); in JNIFUNCF()
137 AndroidBitmap_lockPixels(env, dst, (void**) &destination); in JNIFUNCF()
139 AndroidBitmap_unlockPixels(env, dst); in JNIFUNCF()
140 AndroidBitmap_unlockPixels(env, src); in JNIFUNCF()
147 AndroidBitmap_lockPixels(env, src, (void**) &source); in JNIFUNCF()
148 AndroidBitmap_lockPixels(env, dst, (void**) &destination); in JNIFUNCF()
150 AndroidBitmap_unlockPixels(env, dst); in JNIFUNCF()
151 AndroidBitmap_unlockPixels(env, src); in JNIFUNCF()
158 AndroidBitmap_lockPixels(env, src, (void**) &source); in JNIFUNCF()
159 AndroidBitmap_lockPixels(env, dst, (void**) &destination); in JNIFUNCF()
[all …]
Dhue.c22 AndroidBitmap_lockPixels(env, bitmap, (void**) &destination); in JNIFUNCF()
26 jfloat* mat = (*env)->GetFloatArrayElements(env, matrix,0); in JNIFUNCF()
43 (*env)->ReleaseFloatArrayElements(env, matrix, mat, 0); in JNIFUNCF()
44 AndroidBitmap_unlockPixels(env, bitmap); in JNIFUNCF()
Dbw.c22 AndroidBitmap_lockPixels(env, bitmap, (void**) &destination); in JNIFUNCF()
40 AndroidBitmap_unlockPixels(env, bitmap); in JNIFUNCF()
46 AndroidBitmap_lockPixels(env, bitmap, (void**) &destination); in JNIFUNCF()
62 AndroidBitmap_unlockPixels(env, bitmap); in JNIFUNCF()
68 AndroidBitmap_lockPixels(env, bitmap, (void**) &destination); in JNIFUNCF()
84 AndroidBitmap_unlockPixels(env, bitmap); in JNIFUNCF()
90 AndroidBitmap_lockPixels(env, bitmap, (void**) &destination); in JNIFUNCF()
106 AndroidBitmap_unlockPixels(env, bitmap); in JNIFUNCF()
Dfx.c36 AndroidBitmap_lockPixels(env, bitmap, (void**) &destination); in JNIFUNCF()
37 AndroidBitmap_lockPixels(env, lutbitmap, (void**) &lut); in JNIFUNCF()
86 AndroidBitmap_unlockPixels(env, bitmap); in JNIFUNCF()
87 AndroidBitmap_unlockPixels(env, lutbitmap); in JNIFUNCF()
/packages/inputmethods/OpenWnn/libs/libwnnDictionary/
DOpenWnnDictionaryImplJni.c58 static int convertStringToNjChar( JNIEnv *env, NJ_CHAR* dst, jstring srcJ, int maxChars ) in convertStringToNjChar() argument
62 src = ( const unsigned char* )( ( *env )->GetStringUTFChars( env, srcJ, NULL ) ); in convertStringToNjChar()
129 ( *env )->ReleaseStringUTFChars( env, srcJ, ( const char* )src ); in convertStringToNjChar()
136 static int convertNjCharToString( JNIEnv* env, jstring* dstJ, NJ_CHAR* src, int maxChars ) in convertNjCharToString() argument
194 *dstJ = ( *env )->NewStringUTF( env, dst ); in convertNjCharToString()
206 (JNIEnv *env, jobject obj, jstring dicLibPathJ) in Java_jp_co_omronsoft_openwnn_OpenWnnDictionaryImplJni_createWnnWork() argument
226 ( dicLibPath = ( *env )->GetStringUTFChars( env, dicLibPathJ, 0 ) ) == NULL ) { in Java_jp_co_omronsoft_openwnn_OpenWnnDictionaryImplJni_createWnnWork()
232 ( *env )->ReleaseStringUTFChars( env, dicLibPathJ, dicLibPath ); in Java_jp_co_omronsoft_openwnn_OpenWnnDictionaryImplJni_createWnnWork()
285 (JNIEnv *env, jobject obj, jlong wnnWork) in Java_jp_co_omronsoft_openwnn_OpenWnnDictionaryImplJni_freeWnnWork() argument
311 (JNIEnv *env, jobject obj, jlong wnnWork) in Java_jp_co_omronsoft_openwnn_OpenWnnDictionaryImplJni_clearDictionaryParameters() argument
[all …]
/packages/inputmethods/LatinIME/native/jni/src/
Dproximity_info.cpp34 static inline void safeGetOrFillZeroIntArrayRegion(JNIEnv *env, jintArray jArray, jsize len, in safeGetOrFillZeroIntArrayRegion() argument
37 env->GetIntArrayRegion(jArray, 0, len, buffer); in safeGetOrFillZeroIntArrayRegion()
43 static inline void safeGetOrFillZeroFloatArrayRegion(JNIEnv *env, jfloatArray jArray, jsize len, in safeGetOrFillZeroFloatArrayRegion() argument
46 env->GetFloatArrayRegion(jArray, 0, len, buffer); in safeGetOrFillZeroFloatArrayRegion()
52 ProximityInfo::ProximityInfo(JNIEnv *env, const jstring localeJStr, const int maxProximityCharsSize, in ProximityInfo() argument
76 const jsize localeCStrUtf8Length = env->GetStringUTFLength(localeJStr); in ProximityInfo()
82 env->GetStringUTFRegion(localeJStr, 0, env->GetStringLength(localeJStr), mLocaleStr); in ProximityInfo()
83 safeGetOrFillZeroIntArrayRegion(env, proximityChars, proximityGridLength, mProximityCharsArray); in ProximityInfo()
84 safeGetOrFillZeroIntArrayRegion(env, keyXCoordinates, KEY_COUNT, mKeyXCoordinates); in ProximityInfo()
85 safeGetOrFillZeroIntArrayRegion(env, keyYCoordinates, KEY_COUNT, mKeyYCoordinates); in ProximityInfo()
[all …]
Ddic_traverse_wrapper.h30 static void *getDicTraverseSession(JNIEnv *env, jstring locale) { in getDicTraverseSession() argument
32 return sDicTraverseSessionFactoryMethod(env, locale); in getDicTraverseSession()
65 int register_DicTraverseSession(JNIEnv *env);
/packages/apps/Camera/jni/
Dfeature_mos_jni.cpp278 JNIEnv* env, jobject thiz, jint width, jint height) in Java_com_android_camera_Mosaic_allocateMosaicMemory() argument
297 JNIEnv* env, jobject thiz) in Java_com_android_camera_Mosaic_freeMosaicMemory() argument
365 JNIEnv* env, jobject thiz) in Java_com_android_camera_Mosaic_setSourceImageFromGPU() argument
406 jfloatArray bytes = env->NewFloatArray(11); in Java_com_android_camera_Mosaic_setSourceImageFromGPU()
409 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS); in Java_com_android_camera_Mosaic_setSourceImageFromGPU()
417 JNIEnv* env, jobject thiz, jbyteArray photo_data) in Java_com_android_camera_Mosaic_setSourceImage() argument
426 jbyte *pixels = env->GetByteArrayElements(photo_data, 0); in Java_com_android_camera_Mosaic_setSourceImage()
431 env->ReleaseByteArrayElements(photo_data, pixels, 0); in Java_com_android_camera_Mosaic_setSourceImage()
465 jfloatArray bytes = env->NewFloatArray(11); in Java_com_android_camera_Mosaic_setSourceImage()
468 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS); in Java_com_android_camera_Mosaic_setSourceImage()
[all …]
Dmosaic_renderer_jni.cpp482 JNIEnv * env, jobject obj);
484 JNIEnv * env, jobject obj, jint width, jint height,
487 JNIEnv * env, jobject obj, jfloatArray stMatrix);
489 JNIEnv * env, jobject obj);
491 JNIEnv * env, jobject obj);
493 JNIEnv * env, jobject obj);
495 JNIEnv * env, jobject obj, jboolean flag);
512 JNIEnv * env, jobject obj) in Java_com_android_camera_MosaicRenderer_init() argument
582 JNIEnv * env, jobject obj, jint width, jint height, jboolean isLandscapeOrientation) in Java_com_android_camera_MosaicRenderer_reset() argument
663 JNIEnv * env, jobject obj, jfloatArray stMatrix) in Java_com_android_camera_MosaicRenderer_preprocess() argument
[all …]
/packages/apps/LegacyCamera/jni/
Dfeature_mos_jni.cpp278 JNIEnv* env, jobject thiz, jint width, jint height) in Java_com_android_camera_panorama_Mosaic_allocateMosaicMemory() argument
297 JNIEnv* env, jobject thiz) in Java_com_android_camera_panorama_Mosaic_freeMosaicMemory() argument
365 JNIEnv* env, jobject thiz) in Java_com_android_camera_panorama_Mosaic_setSourceImageFromGPU() argument
406 jfloatArray bytes = env->NewFloatArray(11); in Java_com_android_camera_panorama_Mosaic_setSourceImageFromGPU()
409 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS); in Java_com_android_camera_panorama_Mosaic_setSourceImageFromGPU()
417 JNIEnv* env, jobject thiz, jbyteArray photo_data) in Java_com_android_camera_panorama_Mosaic_setSourceImage() argument
426 jbyte *pixels = env->GetByteArrayElements(photo_data, 0); in Java_com_android_camera_panorama_Mosaic_setSourceImage()
431 env->ReleaseByteArrayElements(photo_data, pixels, 0); in Java_com_android_camera_panorama_Mosaic_setSourceImage()
465 jfloatArray bytes = env->NewFloatArray(11); in Java_com_android_camera_panorama_Mosaic_setSourceImage()
468 env->SetFloatArrayRegion(bytes, 0, 11, (jfloat*) gTRS); in Java_com_android_camera_panorama_Mosaic_setSourceImage()
[all …]
Dmosaic_renderer_jni.cpp463 JNIEnv * env, jobject obj);
465 JNIEnv * env, jobject obj, jint width, jint height,
468 JNIEnv * env, jobject obj, jfloatArray stMatrix);
470 JNIEnv * env, jobject obj);
472 JNIEnv * env, jobject obj);
474 JNIEnv * env, jobject obj);
476 JNIEnv * env, jobject obj, jboolean flag);
480 JNIEnv * env, jobject obj) in Java_com_android_camera_panorama_MosaicRenderer_init() argument
544 JNIEnv * env, jobject obj, jint width, jint height, jboolean isLandscapeOrientation) in Java_com_android_camera_panorama_MosaicRenderer_reset() argument
626 JNIEnv * env, jobject obj, jfloatArray stMatrix) in Java_com_android_camera_panorama_MosaicRenderer_preprocess() argument
[all …]

12