Home
last modified time | relevance | path

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

1234

/packages/services/BuiltInPrintService/jni/lib/
DwprintJNI.c132 static void stringToJava(JNIEnv *env, jobject obj, jfieldID id, const char *str);
284 static void _get_pdf_page_range(JNIEnv *env, jobject javaJobParams, int *pages_ary, int num_pages, in _get_pdf_page_range() argument
287 jstring pageRangeObject = (jstring) (*env)->GetObjectField(env, javaJobParams, in _get_pdf_page_range()
290 int page_range_size = (*env)->GetStringLength(env, pageRangeObject); in _get_pdf_page_range()
291 const jbyte *pageRange = (jbyte *) (*env)->GetStringUTFChars(env, pageRangeObject, 0); in _get_pdf_page_range()
303 (*env)->ReleaseStringUTFChars(env, pageRangeObject, (const char *) pageRange); in _get_pdf_page_range()
386 static void _initJNI(JNIEnv *env, jobject callbackReceiver, jstring fakeDir) { in _initJNI() argument
387 _fakeDir = (jstring) (*env)->NewGlobalRef(env, fakeDir); in _initJNI()
390 _LocalJobParamsClass = (jclass) (*env)->NewGlobalRef( in _initJNI()
391 env, (*env)->FindClass(env, "com/android/bips/jni/LocalJobParams")); in _initJNI()
[all …]
/packages/apps/Bluetooth/jni/
Dcom_android_bluetooth_gatt.cpp80 static RawAddress str2addr(JNIEnv* env, jstring address) { in str2addr() argument
82 const char* c_address = env->GetStringUTFChars(address, NULL); in str2addr()
86 env->ReleaseStringUTFChars(address, c_address); in str2addr()
91 static jstring bdaddr2newjstr(JNIEnv* env, const RawAddress* bda) { in bdaddr2newjstr() argument
97 return env->NewStringUTF(c_address); in bdaddr2newjstr()
100 static std::vector<uint8_t> toVector(JNIEnv* env, jbyteArray ba) { in toVector() argument
101 jbyte* data_data = env->GetByteArrayElements(ba, NULL); in toVector()
102 uint16_t data_len = (uint16_t)env->GetArrayLength(ba); in toVector()
104 env->ReleaseByteArrayElements(ba, data_data, JNI_ABORT); in toVector()
433 void fillGattDbElementArray(JNIEnv* env, jobject* array, in fillGattDbElementArray() argument
[all …]
Dcom_android_bluetooth_btservice_AdapterService.cpp514 JNIEnv* env = attacher.getEnv(); in set_wake_alarm_callout() local
516 if (env == nullptr) { in set_wake_alarm_callout()
526 env->CallBooleanMethod(sJniAdapterServiceObj, method_setWakeAlarm, in set_wake_alarm_callout()
538 JNIEnv* env = attacher.getEnv(); in acquire_wake_lock_callout() local
540 if (env == nullptr) { in acquire_wake_lock_callout()
547 ScopedLocalRef<jstring> lock_name_jni(env, env->NewStringUTF(lock_name)); in acquire_wake_lock_callout()
549 bool acquired = env->CallBooleanMethod( in acquire_wake_lock_callout()
563 JNIEnv* env = attacher.getEnv(); in release_wake_lock_callout() local
565 if (env == nullptr) { in release_wake_lock_callout()
572 ScopedLocalRef<jstring> lock_name_jni(env, env->NewStringUTF(lock_name)); in release_wake_lock_callout()
[all …]
Dcom_android_bluetooth_avrcp_target.cpp174 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
175 method_getCurrentSongInfo = env->GetMethodID( in classInitNative()
178 method_getPlaybackStatus = env->GetMethodID( in classInitNative()
182 env->GetMethodID(clazz, "sendMediaKeyEvent", "(IZ)V"); in classInitNative()
185 env->GetMethodID(clazz, "getCurrentMediaId", "()Ljava/lang/String;"); in classInitNative()
188 env->GetMethodID(clazz, "getNowPlayingList", "()Ljava/util/List;"); in classInitNative()
191 env->GetMethodID(clazz, "getCurrentPlayerId", "()I"); in classInitNative()
194 env->GetMethodID(clazz, "getMediaPlayerList", "()Ljava/util/List;"); in classInitNative()
196 method_setBrowsedPlayer = env->GetMethodID(clazz, "setBrowsedPlayer", "(I)V"); in classInitNative()
198 method_getFolderItemsRequest = env->GetMethodID( in classInitNative()
[all …]
Dcom_android_bluetooth_hfpclient.cpp396 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
398 env->GetMethodID(clazz, "onConnectionStateChanged", "(III[B)V"); in classInitNative()
400 env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); in classInitNative()
402 env->GetMethodID(clazz, "onVrStateChanged", "(I[B)V"); in classInitNative()
403 method_onNetworkState = env->GetMethodID(clazz, "onNetworkState", "(I[B)V"); in classInitNative()
404 method_onNetworkRoaming = env->GetMethodID(clazz, "onNetworkRoaming", "(I[B)V"); in classInitNative()
405 method_onNetworkSignal = env->GetMethodID(clazz, "onNetworkSignal", "(I[B)V"); in classInitNative()
406 method_onBatteryLevel = env->GetMethodID(clazz, "onBatteryLevel", "(I[B)V"); in classInitNative()
408 env->GetMethodID(clazz, "onCurrentOperator", "(Ljava/lang/String;[B)V"); in classInitNative()
409 method_onCall = env->GetMethodID(clazz, "onCall", "(I[B)V"); in classInitNative()
[all …]
Dcom_android_bluetooth_hfp.cpp406 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
408 env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); in classInitNative()
410 env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); in classInitNative()
412 env->GetMethodID(clazz, "onVrStateChanged", "(I[B)V"); in classInitNative()
413 method_onAnswerCall = env->GetMethodID(clazz, "onAnswerCall", "([B)V"); in classInitNative()
414 method_onHangupCall = env->GetMethodID(clazz, "onHangupCall", "([B)V"); in classInitNative()
416 env->GetMethodID(clazz, "onVolumeChanged", "(II[B)V"); in classInitNative()
418 env->GetMethodID(clazz, "onDialCall", "(Ljava/lang/String;[B)V"); in classInitNative()
419 method_onSendDtmf = env->GetMethodID(clazz, "onSendDtmf", "(I[B)V"); in classInitNative()
421 env->GetMethodID(clazz, "onNoiseReductionEnable", "(Z[B)V"); in classInitNative()
[all …]
Dcom_android_bluetooth_a2dp.cpp171 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
173 env->FindClass("android/bluetooth/BluetoothCodecConfig"); in classInitNative()
175 env->GetMethodID(jniBluetoothCodecConfigClass, "<init>", "(IIIIIJJJJ)V"); in classInitNative()
177 env->GetMethodID(jniBluetoothCodecConfigClass, "getCodecType", "()I"); in classInitNative()
179 env->GetMethodID(jniBluetoothCodecConfigClass, "getCodecPriority", "()I"); in classInitNative()
181 env->GetMethodID(jniBluetoothCodecConfigClass, "getSampleRate", "()I"); in classInitNative()
183 env->GetMethodID(jniBluetoothCodecConfigClass, "getBitsPerSample", "()I"); in classInitNative()
185 env->GetMethodID(jniBluetoothCodecConfigClass, "getChannelMode", "()I"); in classInitNative()
186 android_bluetooth_BluetoothCodecConfig.getCodecSpecific1 = env->GetMethodID( in classInitNative()
188 android_bluetooth_BluetoothCodecConfig.getCodecSpecific2 = env->GetMethodID( in classInitNative()
[all …]
Dcom_android_bluetooth_hid_host.cpp187 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
189 env->GetMethodID(clazz, "onConnectStateChanged", "([BI)V"); in classInitNative()
191 env->GetMethodID(clazz, "onGetProtocolMode", "([BI)V"); in classInitNative()
192 method_onGetReport = env->GetMethodID(clazz, "onGetReport", "([B[BI)V"); in classInitNative()
193 method_onHandshake = env->GetMethodID(clazz, "onHandshake", "([BI)V"); in classInitNative()
194 method_onVirtualUnplug = env->GetMethodID(clazz, "onVirtualUnplug", "([BI)V"); in classInitNative()
195 method_onGetIdleTime = env->GetMethodID(clazz, "onGetIdleTime", "([BI)V"); in classInitNative()
200 static void initializeNative(JNIEnv* env, jobject object) { in initializeNative() argument
215 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
233 mCallbacksObj = env->NewGlobalRef(object); in initializeNative()
[all …]
Dcom_android_bluetooth_avrcp_controller.cpp744 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
746 env->GetMethodID(clazz, "handlePassthroughRsp", "(II[B)V"); in classInitNative()
749 env->GetMethodID(clazz, "handleGroupNavigationRsp", "(II)V"); in classInitNative()
752 env->GetMethodID(clazz, "onConnectionStateChanged", "(ZZ[B)V"); in classInitNative()
754 method_getRcFeatures = env->GetMethodID(clazz, "getRcFeatures", "([BI)V"); in classInitNative()
757 env->GetMethodID(clazz, "setPlayerAppSettingRsp", "([BB)V"); in classInitNative()
760 env->GetMethodID(clazz, "handlePlayerAppSetting", "([B[BI)V"); in classInitNative()
763 env->GetMethodID(clazz, "onPlayerAppSettingChanged", "([B[BI)V"); in classInitNative()
766 env->GetMethodID(clazz, "handleSetAbsVolume", "([BBB)V"); in classInitNative()
769 env->GetMethodID(clazz, "handleRegisterNotificationAbsVol", "([BB)V"); in classInitNative()
[all …]
Dcom_android_bluetooth_hid_device.cpp156 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
160 env->GetMethodID(clazz, "onApplicationStateChanged", "([BZ)V"); in classInitNative()
162 env->GetMethodID(clazz, "onConnectStateChanged", "([BI)V"); in classInitNative()
163 method_onGetReport = env->GetMethodID(clazz, "onGetReport", "(BBS)V"); in classInitNative()
164 method_onSetReport = env->GetMethodID(clazz, "onSetReport", "(BB[B)V"); in classInitNative()
165 method_onSetProtocol = env->GetMethodID(clazz, "onSetProtocol", "(B)V"); in classInitNative()
166 method_onInterruptData = env->GetMethodID(clazz, "onInterruptData", "(B[B)V"); in classInitNative()
168 env->GetMethodID(clazz, "onVirtualCableUnplug", "()V"); in classInitNative()
171 static void initNative(JNIEnv* env, jobject object) { in initNative() argument
190 env->DeleteGlobalRef(mCallbacksObj); in initNative()
[all …]
Dcom_android_bluetooth_sdp.cpp55 static void initializeNative(JNIEnv* env, jobject object) { in initializeNative() argument
76 sCallbacksObj = env->NewGlobalRef(object); in initializeNative()
79 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
82 env->GetMethodID(clazz, "sdpRecordFoundCallback", "(I[B[BI[B)V"); in classInitNative()
85 method_sdpMasRecordFoundCallback = env->GetMethodID( in classInitNative()
88 method_sdpMnsRecordFoundCallback = env->GetMethodID( in classInitNative()
91 method_sdpPseRecordFoundCallback = env->GetMethodID( in classInitNative()
95 env->GetMethodID(clazz, "sdpOppOpsRecordFoundCallback", in classInitNative()
98 method_sdpSapsRecordFoundCallback = env->GetMethodID( in classInitNative()
102 static jboolean sdpSearchNative(JNIEnv* env, jobject obj, jbyteArray address, in sdpSearchNative() argument
[all …]
Dcom_android_bluetooth_hearing_aid.cpp93 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
95 env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); in classInitNative()
98 env->GetMethodID(clazz, "onDeviceAvailable", "(BJ[B)V"); in classInitNative()
103 static void initNative(JNIEnv* env, jobject object) { in initNative() argument
121 env->DeleteGlobalRef(mCallbacksObj); in initNative()
125 if ((mCallbacksObj = env->NewGlobalRef(object)) == nullptr) { in initNative()
140 static void cleanupNative(JNIEnv* env, jobject object) { in cleanupNative() argument
156 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
161 static jboolean connectHearingAidNative(JNIEnv* env, jobject object, in connectHearingAidNative() argument
167 jbyte* addr = env->GetByteArrayElements(address, nullptr); in connectHearingAidNative()
[all …]
Dcom_android_bluetooth_a2dp_sink.cpp100 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
102 env->GetMethodID(clazz, "onConnectionStateChanged", "([BI)V"); in classInitNative()
105 env->GetMethodID(clazz, "onAudioStateChanged", "([BI)V"); in classInitNative()
108 env->GetMethodID(clazz, "onAudioConfigChanged", "([BII)V"); in classInitNative()
113 static void initNative(JNIEnv* env, jobject object) { in initNative() argument
128 env->DeleteGlobalRef(mCallbacksObj); in initNative()
147 mCallbacksObj = env->NewGlobalRef(object); in initNative()
150 static void cleanupNative(JNIEnv* env, jobject object) { in cleanupNative() argument
164 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
169 static jboolean connectA2dpNative(JNIEnv* env, jobject object, in connectA2dpNative() argument
[all …]
Dcom_android_bluetooth.h49 JNIEnv *env = AndroidRuntime::getJNIEnv(); in valid() local
50 if (!mCallbackEnv || (mCallbackEnv != env)) { in valid()
51 ALOGE("%s: Callback env fail: env: %p, callback: %p", mName, env, mCallbackEnv); in valid()
133 int register_com_android_bluetooth_hfp(JNIEnv* env);
135 int register_com_android_bluetooth_hfpclient(JNIEnv* env);
137 int register_com_android_bluetooth_a2dp(JNIEnv* env);
139 int register_com_android_bluetooth_a2dp_sink(JNIEnv* env);
141 int register_com_android_bluetooth_avrcp(JNIEnv* env);
143 int register_com_android_bluetooth_avrcp_target(JNIEnv* env);
145 int register_com_android_bluetooth_avrcp_controller(JNIEnv* env);
[all …]
Dcom_android_bluetooth_pan.cpp105 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
107 env->GetMethodID(clazz, "onConnectStateChanged", "([BIIII)V"); in classInitNative()
108 method_onControlStateChanged = env->GetMethodID( in classInitNative()
115 static void initializeNative(JNIEnv* env, jobject object) { in initializeNative() argument
133 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
143 mCallbacksObj = env->NewGlobalRef(object); in initializeNative()
151 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
158 static void cleanupNative(JNIEnv* env, jobject object) { in cleanupNative() argument
169 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
175 static jboolean enablePanNative(JNIEnv* env, jobject object, jint local_role) { in enablePanNative() argument
[all …]
/packages/inputmethods/LatinIME/native/jni/
Dcom_android_inputmethod_latin_BinaryDictionary.cpp45 static jlong latinime_BinaryDictionary_open(JNIEnv *env, jclass clazz, jstring sourceDir, in latinime_BinaryDictionary_open() argument
49 const jsize sourceDirUtf8Length = env->GetStringUTFLength(sourceDir); in latinime_BinaryDictionary_open()
55 env->GetStringUTFRegion(sourceDir, 0, env->GetStringLength(sourceDir), sourceDirChars); in latinime_BinaryDictionary_open()
66 new Dictionary(env, std::move(dictionaryStructureWithBufferPolicy)); in latinime_BinaryDictionary_open()
71 static jlong latinime_BinaryDictionary_createOnMemory(JNIEnv *env, jclass clazz, in latinime_BinaryDictionary_createOnMemory() argument
74 const jsize localeUtf8Length = env->GetStringUTFLength(locale); in latinime_BinaryDictionary_createOnMemory()
76 env->GetStringUTFRegion(locale, 0, env->GetStringLength(locale), localeChars); in latinime_BinaryDictionary_createOnMemory()
80 const int keyCount = env->GetArrayLength(attributeKeyStringArray); in latinime_BinaryDictionary_createOnMemory()
81 const int valueCount = env->GetArrayLength(attributeValueStringArray); in latinime_BinaryDictionary_createOnMemory()
86 JniDataUtils::constructAttributeMap(env, attributeKeyStringArray, in latinime_BinaryDictionary_createOnMemory()
[all …]
Dcom_android_inputmethod_latin_BinaryDictionaryUtils.cpp32 static jboolean latinime_BinaryDictionaryUtils_createEmptyDictFile(JNIEnv *env, jclass clazz, in latinime_BinaryDictionaryUtils_createEmptyDictFile() argument
35 const jsize filePathUtf8Length = env->GetStringUTFLength(filePath); in latinime_BinaryDictionaryUtils_createEmptyDictFile()
37 env->GetStringUTFRegion(filePath, 0, env->GetStringLength(filePath), filePathChars); in latinime_BinaryDictionaryUtils_createEmptyDictFile()
40 const jsize localeUtf8Length = env->GetStringUTFLength(locale); in latinime_BinaryDictionaryUtils_createEmptyDictFile()
42 env->GetStringUTFRegion(locale, 0, env->GetStringLength(locale), localeChars); in latinime_BinaryDictionaryUtils_createEmptyDictFile()
47 const int keyCount = env->GetArrayLength(attributeKeyStringArray); in latinime_BinaryDictionaryUtils_createEmptyDictFile()
48 const int valueCount = env->GetArrayLength(attributeValueStringArray); in latinime_BinaryDictionaryUtils_createEmptyDictFile()
53 JniDataUtils::constructAttributeMap(env, attributeKeyStringArray, in latinime_BinaryDictionaryUtils_createEmptyDictFile()
59 static jfloat latinime_BinaryDictionaryUtils_calcNormalizedScore(JNIEnv *env, jclass clazz, in latinime_BinaryDictionaryUtils_calcNormalizedScore() argument
61 jsize beforeLength = env->GetArrayLength(before); in latinime_BinaryDictionaryUtils_calcNormalizedScore()
[all …]
/packages/apps/Gallery2/jni_jpegstream/src/
Djpegstream.cpp31 static jint OutputStream_setup(JNIEnv* env, jobject thiz, jobject out, in OutputStream_setup() argument
34 jclass thisClass = env->GetObjectClass(thiz); in OutputStream_setup()
35 if (env->ExceptionCheck() || thisClass == NULL) { in OutputStream_setup()
39 jfieldID fidNumber = env->GetFieldID(thisClass, "JNIPointer", "J"); in OutputStream_setup()
40 if (NULL == fidNumber || env->ExceptionCheck()) { in OutputStream_setup()
69 int32_t errorFlag = w_ptr->setup(env, out, w, h, fmt, q); in OutputStream_setup()
70 if (env->ExceptionCheck() || errorFlag != J_SUCCESS) { in OutputStream_setup()
76 env->SetLongField(thiz, fidNumber, reinterpret_cast<jlong>(w_ptr)); in OutputStream_setup()
77 if (env->ExceptionCheck()) { in OutputStream_setup()
84 static jint InputStream_setup(JNIEnv* env, jobject thiz, jobject dimens, in InputStream_setup() argument
[all …]
/packages/services/BuiltInPrintService/jni/plugins/
Dpdf_render.c34 JNIEnv *env; member
53 jstring fileNameString = (*self->env)->NewStringUTF(self->env, fileName); in openDocument()
54 int count = (*self->env)->CallIntMethod(self->env, self->obj, gPdfRenderOpenDocument, in openDocument()
66 jobject size = (*self->env)->CallObjectMethod(self->env, self->obj, gPdfRenderGetPageSize, in getPageAttributes()
71 *width = (double) (*self->env)->CallDoubleMethod(self->env, size, gSizeDGetWidth); in getPageAttributes()
72 *height = (double) (*self->env)->CallDoubleMethod(self->env, size, gSizeDGetHeight); in getPageAttributes()
84 jobject byteBuffer = (*self->env)->NewDirectByteBuffer(self->env, buffer, bufferSize); in renderPageStripe()
86 if (!(*self->env)->CallBooleanMethod(self->env, self->obj, gPdfRenderRenderPageStripe, page, in renderPageStripe()
91 (*self->env)->DeleteLocalRef(self->env, byteBuffer); in renderPageStripe()
99 (*self->env)->DeleteGlobalRef(self->env, self->obj); in destroy()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/utils/
Djni_data_utils.cpp26 /* static */ void JniDataUtils::outputWordProperty(JNIEnv *const env, in outputWordProperty() argument
33 JniDataUtils::outputCodePoints(env, outCodePoints, 0 /* start */, in outputWordProperty()
41 env->SetBooleanArrayRegion(outFlags, 0 /* start */, NELEMS(flags), flags); in outputWordProperty()
45 env->SetIntArrayRegion(outProbabilityInfo, 0 /* start */, NELEMS(probabilityInfo), in outputWordProperty()
48 jclass integerClass = env->FindClass("java/lang/Integer"); in outputWordProperty()
49 jmethodID intToIntegerConstructorId = env->GetMethodID(integerClass, "<init>", "(I)V"); in outputWordProperty()
50 jclass arrayListClass = env->FindClass("java/util/ArrayList"); in outputWordProperty()
51 jmethodID addMethodId = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); in outputWordProperty()
54 jclass intArrayClass = env->FindClass("[I"); in outputWordProperty()
57 jobjectArray prevWordWordCodePointsArray = env->NewObjectArray( in outputWordProperty()
[all …]
Djni_data_utils.h34 static void jintarrayToVector(JNIEnv *env, jintArray array, std::vector<int> *const outVector) { in jintarrayToVector() argument
39 const jsize arrayLength = env->GetArrayLength(array); in jintarrayToVector()
41 env->GetIntArrayRegion(array, 0 /* start */, arrayLength, outVector->data()); in jintarrayToVector()
44 static DictionaryHeaderStructurePolicy::AttributeMap constructAttributeMap(JNIEnv *env, in constructAttributeMap() argument
47 const int keyCount = env->GetArrayLength(attributeKeyStringArray); in constructAttributeMap()
50 env->GetObjectArrayElement(attributeKeyStringArray, i)); in constructAttributeMap()
51 const jsize keyUtf8Length = env->GetStringUTFLength(keyString); in constructAttributeMap()
53 env->GetStringUTFRegion(keyString, 0, env->GetStringLength(keyString), keyChars); in constructAttributeMap()
54 env->DeleteLocalRef(keyString); in constructAttributeMap()
60 env->GetObjectArrayElement(attributeValueStringArray, i)); in constructAttributeMap()
[all …]
/packages/modules/NetworkStack/tests/unit/jni/
Dapf_jni.cpp33 JNIEnv* env, jclass, jbyteArray jprogram, jbyteArray jpacket, in com_android_server_ApfTest_apfSimulate() argument
36 ScopedByteArrayRO packet(env, jpacket); in com_android_server_ApfTest_apfSimulate()
38 uint32_t program_len = env->GetArrayLength(jprogram); in com_android_server_ApfTest_apfSimulate()
39 uint32_t data_len = jdata ? env->GetArrayLength(jdata) : 0; in com_android_server_ApfTest_apfSimulate()
42 env->GetByteArrayRegion(jprogram, 0, program_len, reinterpret_cast<jbyte*>(buf.data())); in com_android_server_ApfTest_apfSimulate()
45 env->GetByteArrayRegion(jdata, 0, data_len, in com_android_server_ApfTest_apfSimulate()
54 env->SetByteArrayRegion(jdata, 0, data_len, in com_android_server_ApfTest_apfSimulate()
85 static void throwException(JNIEnv* env, const std::string& error) { in throwException() argument
86 jclass newExcCls = env->FindClass("java/lang/IllegalStateException"); in throwException()
91 env->ThrowNew(newExcCls, error.c_str()); in throwException()
[all …]
/packages/apps/Terminal/jni/
Dcom_android_terminal_Terminal.cpp165 JNIEnv* env = AndroidRuntime::getJNIEnv(); in term_damage() local
166 return env->CallIntMethod(term->getCallbacks(), damageMethod, rect.start_row, rect.end_row, in term_damage()
176 JNIEnv* env = AndroidRuntime::getJNIEnv(); in term_moverect() local
177 return env->CallIntMethod(term->getCallbacks(), moveRectMethod, in term_moverect()
188 JNIEnv* env = AndroidRuntime::getJNIEnv(); in term_movecursor() local
189 return env->CallIntMethod(term->getCallbacks(), moveCursorMethod, pos.row, in term_movecursor()
199 JNIEnv* env = AndroidRuntime::getJNIEnv(); in term_settermprop() local
202 return env->CallIntMethod(term->getCallbacks(), setTermPropBooleanMethod, prop, in term_settermprop()
205 return env->CallIntMethod(term->getCallbacks(), setTermPropIntMethod, prop, val->number); in term_settermprop()
207 return env->CallIntMethod(term->getCallbacks(), setTermPropStringMethod, prop, in term_settermprop()
[all …]
/packages/modules/NetworkStack/jni/
Dnetwork_stack_utils_jni.cpp50 static bool checkLenAndCopy(JNIEnv* env, const jbyteArray& addr, int len, void* dst) { in checkLenAndCopy() argument
51 if (env->GetArrayLength(addr) != len) { in checkLenAndCopy()
54 env->GetByteArrayRegion(addr, 0, len, reinterpret_cast<jbyte*>(dst)); in checkLenAndCopy()
58 static void network_stack_utils_addArpEntry(JNIEnv *env, jobject thiz, jbyteArray ethAddr, in network_stack_utils_addArpEntry() argument
65 if (!checkLenAndCopy(env, ethAddr, ETH_ALEN, ethAddrStruct.sa_data)) { in network_stack_utils_addArpEntry()
66 jniThrowException(env, "java/io/IOException", "Invalid ethAddr length"); in network_stack_utils_addArpEntry()
71 if (!checkLenAndCopy(env, ipv4Addr, sizeof(in_addr), &netAddrStruct.sin_addr)) { in network_stack_utils_addArpEntry()
72 jniThrowException(env, "java/io/IOException", "Invalid ipv4Addr length"); in network_stack_utils_addArpEntry()
76 int ifLen = env->GetStringLength(ifname); in network_stack_utils_addArpEntry()
79 jniThrowException(env, "java/io/IOException", "ifname too long"); in network_stack_utils_addArpEntry()
[all …]
/packages/apps/TV/jni/
DDvbManager.cpp40 DvbManager::DvbManager(JNIEnv *env, jobject) in DvbManager() argument
48 jclass clazz = env->FindClass("com/android/tv/tuner/TunerHal"); in DvbManager()
50 env->GetMethodID(clazz, "openDvbFrontEndFd", "()I"); in DvbManager()
51 mOpenDvbDemuxMethodID = env->GetMethodID(clazz, "openDvbDemuxFd", "()I"); in DvbManager()
52 mOpenDvbDvrMethodID = env->GetMethodID(clazz, "openDvbDvrFd", "()I"); in DvbManager()
116 int DvbManager::tune(JNIEnv *env, jobject thiz, in tune() argument
120 if (openDvbFe(env, thiz) != 0) { in tune()
252 openDvbDvr(env, thiz); in tune()
266 int DvbManager::openDvbFeFromSystemApi(JNIEnv *env, jobject thiz) { in openDvbFeFromSystemApi() argument
267 int fd = (int) env->CallIntMethod(thiz, mOpenDvbFrontEndMethodID); in openDvbFeFromSystemApi()
[all …]

1234