/packages/services/BuiltInPrintService/jni/lib/ |
D | wprintJNI.c | 132 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/ |
D | com_android_bluetooth_gatt.cpp | 79 static RawAddress str2addr(JNIEnv* env, jstring address) { in str2addr() argument 81 const char* c_address = env->GetStringUTFChars(address, NULL); in str2addr() 85 env->ReleaseStringUTFChars(address, c_address); in str2addr() 90 static jstring bdaddr2newjstr(JNIEnv* env, const RawAddress* bda) { in bdaddr2newjstr() argument 96 return env->NewStringUTF(c_address); in bdaddr2newjstr() 99 static std::vector<uint8_t> toVector(JNIEnv* env, jbyteArray ba) { in toVector() argument 100 jbyte* data_data = env->GetByteArrayElements(ba, NULL); in toVector() 101 uint16_t data_len = (uint16_t)env->GetArrayLength(ba); in toVector() 103 env->ReleaseByteArrayElements(ba, data_data, JNI_ABORT); in toVector() 432 void fillGattDbElementArray(JNIEnv* env, jobject* array, in fillGattDbElementArray() argument [all …]
|
D | com_android_bluetooth_btservice_AdapterService.cpp | 514 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 …]
|
D | com_android_bluetooth_avrcp_target.cpp | 173 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 174 method_getCurrentSongInfo = env->GetMethodID( in classInitNative() 177 method_getPlaybackStatus = env->GetMethodID( in classInitNative() 181 env->GetMethodID(clazz, "sendMediaKeyEvent", "(IZ)V"); in classInitNative() 184 env->GetMethodID(clazz, "getCurrentMediaId", "()Ljava/lang/String;"); in classInitNative() 187 env->GetMethodID(clazz, "getNowPlayingList", "()Ljava/util/List;"); in classInitNative() 190 env->GetMethodID(clazz, "getCurrentPlayerId", "()I"); in classInitNative() 193 env->GetMethodID(clazz, "getMediaPlayerList", "()Ljava/util/List;"); in classInitNative() 195 method_setBrowsedPlayer = env->GetMethodID(clazz, "setBrowsedPlayer", "(I)V"); in classInitNative() 197 method_getFolderItemsRequest = env->GetMethodID( in classInitNative() [all …]
|
D | com_android_bluetooth_hfpclient.cpp | 411 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 413 env->GetMethodID(clazz, "onConnectionStateChanged", "(III[B)V"); in classInitNative() 415 env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); in classInitNative() 417 env->GetMethodID(clazz, "onVrStateChanged", "(I[B)V"); in classInitNative() 418 method_onNetworkState = env->GetMethodID(clazz, "onNetworkState", "(I[B)V"); in classInitNative() 419 method_onNetworkRoaming = env->GetMethodID(clazz, "onNetworkRoaming", "(I[B)V"); in classInitNative() 420 method_onNetworkSignal = env->GetMethodID(clazz, "onNetworkSignal", "(I[B)V"); in classInitNative() 421 method_onBatteryLevel = env->GetMethodID(clazz, "onBatteryLevel", "(I[B)V"); in classInitNative() 423 env->GetMethodID(clazz, "onCurrentOperator", "(Ljava/lang/String;[B)V"); in classInitNative() 424 method_onCall = env->GetMethodID(clazz, "onCall", "(I[B)V"); in classInitNative() [all …]
|
D | com_android_bluetooth_hfp.cpp | 405 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 407 env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); in classInitNative() 409 env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); in classInitNative() 411 env->GetMethodID(clazz, "onVrStateChanged", "(I[B)V"); in classInitNative() 412 method_onAnswerCall = env->GetMethodID(clazz, "onAnswerCall", "([B)V"); in classInitNative() 413 method_onHangupCall = env->GetMethodID(clazz, "onHangupCall", "([B)V"); in classInitNative() 415 env->GetMethodID(clazz, "onVolumeChanged", "(II[B)V"); in classInitNative() 417 env->GetMethodID(clazz, "onDialCall", "(Ljava/lang/String;[B)V"); in classInitNative() 418 method_onSendDtmf = env->GetMethodID(clazz, "onSendDtmf", "(I[B)V"); in classInitNative() 420 env->GetMethodID(clazz, "onNoiseReductionEnable", "(Z[B)V"); in classInitNative() [all …]
|
D | com_android_bluetooth_a2dp.cpp | 195 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 197 env->FindClass("android/bluetooth/BluetoothCodecConfig"); in classInitNative() 199 env->GetMethodID(jniBluetoothCodecConfigClass, "<init>", "(IIIIIJJJJ)V"); in classInitNative() 201 env->GetMethodID(jniBluetoothCodecConfigClass, "getCodecType", "()I"); in classInitNative() 203 env->GetMethodID(jniBluetoothCodecConfigClass, "getCodecPriority", "()I"); in classInitNative() 205 env->GetMethodID(jniBluetoothCodecConfigClass, "getSampleRate", "()I"); in classInitNative() 207 env->GetMethodID(jniBluetoothCodecConfigClass, "getBitsPerSample", "()I"); in classInitNative() 209 env->GetMethodID(jniBluetoothCodecConfigClass, "getChannelMode", "()I"); in classInitNative() 210 android_bluetooth_BluetoothCodecConfig.getCodecSpecific1 = env->GetMethodID( in classInitNative() 212 android_bluetooth_BluetoothCodecConfig.getCodecSpecific2 = env->GetMethodID( in classInitNative() [all …]
|
D | com_android_bluetooth_avrcp_controller.cpp | 795 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 797 env->GetMethodID(clazz, "handlePassthroughRsp", "(II[B)V"); in classInitNative() 800 env->GetMethodID(clazz, "handleGroupNavigationRsp", "(II)V"); in classInitNative() 803 env->GetMethodID(clazz, "onConnectionStateChanged", "(ZZ[B)V"); in classInitNative() 805 method_getRcFeatures = env->GetMethodID(clazz, "getRcFeatures", "([BI)V"); in classInitNative() 807 method_getRcPsm = env->GetMethodID(clazz, "getRcPsm", "([BI)V"); in classInitNative() 810 env->GetMethodID(clazz, "setPlayerAppSettingRsp", "([BB)V"); in classInitNative() 813 env->GetMethodID(clazz, "handlePlayerAppSetting", "([B[BI)V"); in classInitNative() 816 env->GetMethodID(clazz, "onPlayerAppSettingChanged", "([B[BI)V"); in classInitNative() 819 env->GetMethodID(clazz, "handleSetAbsVolume", "([BBB)V"); in classInitNative() [all …]
|
D | com_android_bluetooth_hid_host.cpp | 193 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 195 env->GetMethodID(clazz, "onConnectStateChanged", "([BI)V"); in classInitNative() 197 env->GetMethodID(clazz, "onGetProtocolMode", "([BI)V"); in classInitNative() 198 method_onGetReport = env->GetMethodID(clazz, "onGetReport", "([B[BI)V"); in classInitNative() 199 method_onHandshake = env->GetMethodID(clazz, "onHandshake", "([BI)V"); in classInitNative() 200 method_onVirtualUnplug = env->GetMethodID(clazz, "onVirtualUnplug", "([BI)V"); in classInitNative() 201 method_onGetIdleTime = env->GetMethodID(clazz, "onGetIdleTime", "([BI)V"); in classInitNative() 206 static void initializeNative(JNIEnv* env, jobject object) { in initializeNative() argument 222 env->DeleteGlobalRef(mCallbacksObj); in initializeNative() 240 mCallbacksObj = env->NewGlobalRef(object); in initializeNative() [all …]
|
D | com_android_bluetooth_hid_device.cpp | 155 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 159 env->GetMethodID(clazz, "onApplicationStateChanged", "([BZ)V"); in classInitNative() 161 env->GetMethodID(clazz, "onConnectStateChanged", "([BI)V"); in classInitNative() 162 method_onGetReport = env->GetMethodID(clazz, "onGetReport", "(BBS)V"); in classInitNative() 163 method_onSetReport = env->GetMethodID(clazz, "onSetReport", "(BB[B)V"); in classInitNative() 164 method_onSetProtocol = env->GetMethodID(clazz, "onSetProtocol", "(B)V"); in classInitNative() 165 method_onInterruptData = env->GetMethodID(clazz, "onInterruptData", "(B[B)V"); in classInitNative() 167 env->GetMethodID(clazz, "onVirtualCableUnplug", "()V"); in classInitNative() 170 static void initNative(JNIEnv* env, jobject object) { in initNative() argument 189 env->DeleteGlobalRef(mCallbacksObj); in initNative() [all …]
|
D | com_android_bluetooth_sdp.cpp | 54 static void initializeNative(JNIEnv* env, jobject object) { in initializeNative() argument 75 sCallbacksObj = env->NewGlobalRef(object); in initializeNative() 78 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 81 env->GetMethodID(clazz, "sdpRecordFoundCallback", "(I[B[BI[B)V"); in classInitNative() 84 method_sdpMasRecordFoundCallback = env->GetMethodID( in classInitNative() 87 method_sdpMnsRecordFoundCallback = env->GetMethodID( in classInitNative() 90 method_sdpPseRecordFoundCallback = env->GetMethodID( in classInitNative() 94 env->GetMethodID(clazz, "sdpOppOpsRecordFoundCallback", in classInitNative() 97 method_sdpSapsRecordFoundCallback = env->GetMethodID( in classInitNative() 101 static jboolean sdpSearchNative(JNIEnv* env, jobject obj, jbyteArray address, in sdpSearchNative() argument [all …]
|
D | com_android_bluetooth_a2dp_sink.cpp | 99 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 101 env->GetMethodID(clazz, "onConnectionStateChanged", "([BI)V"); in classInitNative() 104 env->GetMethodID(clazz, "onAudioStateChanged", "([BI)V"); in classInitNative() 107 env->GetMethodID(clazz, "onAudioConfigChanged", "([BII)V"); in classInitNative() 112 static void initNative(JNIEnv* env, jobject object) { in initNative() argument 127 env->DeleteGlobalRef(mCallbacksObj); in initNative() 146 mCallbacksObj = env->NewGlobalRef(object); in initNative() 149 static void cleanupNative(JNIEnv* env, jobject object) { in cleanupNative() argument 163 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative() 168 static jboolean connectA2dpNative(JNIEnv* env, jobject object, in connectA2dpNative() argument [all …]
|
D | com_android_bluetooth_hearing_aid.cpp | 92 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument 94 env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); in classInitNative() 97 env->GetMethodID(clazz, "onDeviceAvailable", "(BJ[B)V"); in classInitNative() 102 static void initNative(JNIEnv* env, jobject object) { in initNative() argument 120 env->DeleteGlobalRef(mCallbacksObj); in initNative() 124 if ((mCallbacksObj = env->NewGlobalRef(object)) == nullptr) { in initNative() 139 static void cleanupNative(JNIEnv* env, jobject object) { in cleanupNative() argument 155 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative() 160 static jboolean connectHearingAidNative(JNIEnv* env, jobject object, in connectHearingAidNative() argument 166 jbyte* addr = env->GetByteArrayElements(address, nullptr); in connectHearingAidNative() [all …]
|
/packages/inputmethods/LatinIME/native/jni/ |
D | com_android_inputmethod_latin_BinaryDictionary.cpp | 45 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 …]
|
D | com_android_inputmethod_latin_BinaryDictionaryUtils.cpp | 32 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/ |
D | jpegstream.cpp | 31 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/ |
D | pdf_render.c | 34 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/ |
D | jni_data_utils.cpp | 26 /* 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 …]
|
D | jni_data_utils.h | 34 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/ |
D | apf_jni.cpp | 34 JNIEnv* env, jclass, jbyteArray jprogram, jbyteArray jpacket, in com_android_server_ApfTest_apfSimulate() argument 37 ScopedByteArrayRO packet(env, jpacket); in com_android_server_ApfTest_apfSimulate() 39 uint32_t program_len = env->GetArrayLength(jprogram); in com_android_server_ApfTest_apfSimulate() 40 uint32_t data_len = jdata ? env->GetArrayLength(jdata) : 0; in com_android_server_ApfTest_apfSimulate() 43 env->GetByteArrayRegion(jprogram, 0, program_len, reinterpret_cast<jbyte*>(buf.data())); in com_android_server_ApfTest_apfSimulate() 46 env->GetByteArrayRegion(jdata, 0, data_len, in com_android_server_ApfTest_apfSimulate() 55 env->SetByteArrayRegion(jdata, 0, data_len, in com_android_server_ApfTest_apfSimulate() 86 static void throwException(JNIEnv* env, const std::string& error) { in throwException() argument 87 jclass newExcCls = env->FindClass("java/lang/IllegalStateException"); in throwException() 92 env->ThrowNew(newExcCls, error.c_str()); in throwException() [all …]
|
/packages/apps/Terminal/jni/ |
D | com_android_terminal_Terminal.cpp | 165 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/ |
D | network_stack_utils_jni.cpp | 52 static bool checkLenAndCopy(JNIEnv* env, const jbyteArray& addr, int len, void* dst) { in checkLenAndCopy() argument 53 if (env->GetArrayLength(addr) != len) { in checkLenAndCopy() 56 env->GetByteArrayRegion(addr, 0, len, reinterpret_cast<jbyte*>(dst)); in checkLenAndCopy() 60 static void network_stack_utils_addArpEntry(JNIEnv *env, jobject thiz, jbyteArray ethAddr, in network_stack_utils_addArpEntry() argument 67 if (!checkLenAndCopy(env, ethAddr, ETH_ALEN, ethAddrStruct.sa_data)) { in network_stack_utils_addArpEntry() 68 jniThrowException(env, "java/io/IOException", "Invalid ethAddr length"); in network_stack_utils_addArpEntry() 73 if (!checkLenAndCopy(env, ipv4Addr, sizeof(in_addr), &netAddrStruct.sin_addr)) { in network_stack_utils_addArpEntry() 74 jniThrowException(env, "java/io/IOException", "Invalid ipv4Addr length"); in network_stack_utils_addArpEntry() 78 int ifLen = env->GetStringLength(ifname); in network_stack_utils_addArpEntry() 81 jniThrowException(env, "java/io/IOException", "ifname too long"); in network_stack_utils_addArpEntry() [all …]
|
/packages/apps/TV/jni/ |
D | tunertvinput_jni.cpp | 56 JNIEnv *env, jobject thiz, jlong deviceId, jint frequency, in Java_com_android_tv_tuner_TunerHal_nativeTune__JILjava_lang_String_2I() argument 61 dvbManager = new DvbManager(env, thiz); in Java_com_android_tv_tuner_TunerHal_nativeTune__JILjava_lang_String_2I() 66 int res = dvbManager->tune(env, thiz, frequency, in Java_com_android_tv_tuner_TunerHal_nativeTune__JILjava_lang_String_2I() 67 env->GetStringUTFChars(modulation, 0), timeout_ms); in Java_com_android_tv_tuner_TunerHal_nativeTune__JILjava_lang_String_2I() 78 JNIEnv *env, jobject thiz, jlong deviceId, jint deliverySystemType, in Java_com_android_tv_tuner_TunerHal_nativeTune__JIILjava_lang_String_2I() argument 83 dvbManager = new DvbManager(env, thiz); in Java_com_android_tv_tuner_TunerHal_nativeTune__JIILjava_lang_String_2I() 89 int res = dvbManager->tune(env, thiz, deliverySystemType, frequency, in Java_com_android_tv_tuner_TunerHal_nativeTune__JIILjava_lang_String_2I() 90 env->GetStringUTFChars(modulation, 0), timeout_ms); in Java_com_android_tv_tuner_TunerHal_nativeTune__JIILjava_lang_String_2I() 144 JNIEnv *env, jobject thiz, jlong deviceId, jint pid, jint filterType) { in Java_com_android_tv_tuner_TunerHal_nativeAddPidFilter() argument 147 it->second->startTsPidFilter(env, thiz, pid, filterType); in Java_com_android_tv_tuner_TunerHal_nativeAddPidFilter() [all …]
|
D | DvbManager.cpp | 40 DvbManager::DvbManager(JNIEnv *env, jobject) in DvbManager() argument 47 jclass clazz = env->FindClass("com/android/tv/tuner/TunerHal"); in DvbManager() 49 env->GetMethodID(clazz, "openDvbFrontEndFd", "()I"); in DvbManager() 50 mOpenDvbDemuxMethodID = env->GetMethodID(clazz, "openDvbDemuxFd", "()I"); in DvbManager() 51 mOpenDvbDvrMethodID = env->GetMethodID(clazz, "openDvbDvrFd", "()I"); in DvbManager() 117 int DvbManager::tune(JNIEnv *env, jobject thiz, in tune() argument 119 return tuneInternal(env, thiz, DELIVERY_SYSTEM_UNDEFINED, frequency, in tune() 123 int DvbManager::tune(JNIEnv *env, jobject thiz, in tune() argument 126 return tuneInternal(env, thiz, deliverySystemType, frequency, in tune() 130 int DvbManager::tuneInternal(JNIEnv *env, jobject thiz, in tuneInternal() argument [all …]
|
/packages/apps/Gallery2/jni/filters/ |
D | gradient.c | 27 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()
|