/frameworks/base/media/jni/ |
android_media_MediaCodecList.cpp | 34 static sp<IMediaCodecList> getCodecList(JNIEnv *env) { 39 env, "java/lang/RuntimeException", "cannot get MediaCodecList"); 45 JNIEnv *env, jobject /* thiz */) { 46 sp<IMediaCodecList> mcl = getCodecList(env); 55 JNIEnv *env, jobject /* thiz */, jint index) { 56 sp<IMediaCodecList> mcl = getCodecList(env); 64 jniThrowException(env, "java/lang/IllegalArgumentException", NULL); 69 return env->NewStringUTF(name); 73 JNIEnv *env, jobject /* thiz */, jstring name) { 75 jniThrowException(env, "java/lang/IllegalArgumentException", NULL) [all...] |
android_media_MediaDrm.cpp | 40 var = env->FindClass(className); \ 44 var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \ 48 var = env->GetMethodID(clazz, fieldName, fieldDescriptor); \ 52 var = env->GetStaticFieldID(clazz, fieldName, fieldDescriptor); \ 56 var = env->GetStaticMethodID(clazz, fieldName, fieldDescriptor); \ 158 JNIDrmListener(JNIEnv* env, jobject thiz, jobject weak_thiz); 167 JNIDrmListener::JNIDrmListener(JNIEnv* env, jobject thiz, jobject weak_thiz) 171 jclass clazz = env->GetObjectClass(thiz); 174 jniThrowException(env, "java/lang/Exception", 178 mClass = (jclass)env->NewGlobalRef(clazz) 188 JNIEnv *env = AndroidRuntime::getJNIEnv(); local 232 JNIEnv *env = AndroidRuntime::getJNIEnv(); local 347 JNIEnv *env = AndroidRuntime::getJNIEnv(); local [all...] |
android_media_MediaScanner.cpp | 51 static status_t checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { 52 if (env->ExceptionCheck()) { 54 LOGE_EX(env); 55 env->ExceptionClear(); 111 MyMediaScannerClient(JNIEnv *env, jobject client) 112 : mEnv(env), 113 mClient(env->NewGlobalRef(client)), 120 env->FindClass(kClassMediaScannerClient); 125 mScanFileMethodID = env->GetMethodID( 130 mHandleStringTagMethodID = env->GetMethodID [all...] |
/art/runtime/native/ |
java_lang_Throwable.cc | 25 static jobject Throwable_nativeFillInStackTrace(JNIEnv* env, jclass) { 26 ScopedFastNativeObjectAccess soa(env); 30 static jobjectArray Throwable_nativeGetStackTrace(JNIEnv* env, jclass, jobject javaStackState) { 34 ScopedFastNativeObjectAccess soa(env); 43 void register_java_lang_Throwable(JNIEnv* env) {
|
/frameworks/base/media/mca/filterfw/jni/ |
jni_native_buffer.h | 27 char* GetJBufferData(JNIEnv* env, jobject buffer, int* size); 35 bool AttachDataToJBuffer(JNIEnv* env, jobject buffer, char* data, int size); 43 Java_android_filterfw_core_NativeBuffer_allocate(JNIEnv* env, jobject thiz, jint size); 46 Java_android_filterfw_core_NativeBuffer_deallocate(JNIEnv* env, jobject thiz, jboolean owns_data); 49 Java_android_filterfw_core_NativeBuffer_nativeCopyTo(JNIEnv* env, jobject thiz, jobject new_buffer);
|
jni_vertex_frame.cpp | 24 jboolean Java_android_filterfw_core_VertexFrame_nativeAllocate(JNIEnv* env, 27 return ToJBool(WrapObjectInJava(new VertexFrame(size), env, thiz, true)); 30 jboolean Java_android_filterfw_core_VertexFrame_nativeDeallocate(JNIEnv* env, jobject thiz) { 31 return ToJBool(DeleteNativeObject<VertexFrame>(env, thiz)); 34 jboolean Java_android_filterfw_core_VertexFrame_setNativeInts(JNIEnv* env, 38 VertexFrame* frame = ConvertFromJava<VertexFrame>(env, thiz); 40 jint* int_ptr = env->GetIntArrayElements(ints, NULL); 41 const int length = env->GetArrayLength(ints); 45 env->ReleaseIntArrayElements(ints, int_ptr, JNI_ABORT); 52 jboolean Java_android_filterfw_core_VertexFrame_setNativeFloats(JNIEnv* env, [all...] |
jni_shader_program.cpp | 38 jboolean Java_android_filterfw_core_ShaderProgram_allocate(JNIEnv* env, 44 GLEnv* gl_env_ptr = ConvertFromJava<GLEnv>(env, gl_env); 52 ToCppString(env, fragment_shader)), 53 env, 59 ToCppString(env, vertex_shader), 60 ToCppString(env, fragment_shader)), 61 env, 66 jboolean Java_android_filterfw_core_ShaderProgram_deallocate(JNIEnv* env, jobject thiz) { 67 return ToJBool(DeleteNativeObject<ShaderProgram>(env, thiz)); 70 jboolean Java_android_filterfw_core_ShaderProgram_compileAndLink(JNIEnv* env, jobject thiz) [all...] |
/frameworks/base/services/tests/servicestests/jni/ |
UidRangeTest.h | 24 android::net::UidRange unmarshall(JNIEnv* env, jbyteArray parcelData); 26 jbyteArray marshall(JNIEnv* env, const android::net::UidRange& range); 29 JNIEXPORT jbyteArray Java_android_net_UidRangeTest_readAndWriteNative(JNIEnv* env, jclass, 33 JNIEXPORT jint Java_android_net_UidRangeTest_getStart(JNIEnv* env, jclass, jbyteArray inParcel); 36 JNIEXPORT jint Java_android_net_UidRangeTest_getStop(JNIEnv* env, jclass, jbyteArray inParcel);
|
/libcore/ojluni/src/main/native/ |
Thread.c | 60 void register_java_lang_Thread(JNIEnv* env) { 61 jclass cls = (*env)->FindClass(env, "java/lang/Thread"); 62 (*env)->RegisterNatives(env, cls, methods, ARRAY_LENGTH(methods));
|
nio_util.h | 45 jint fdval(JNIEnv *env, jobject fdo); 47 jint convertReturnVal(JNIEnv *env, jint n, jboolean reading); 48 jlong convertLongReturnVal(JNIEnv *env, jlong n, jboolean reading); 53 jint handleSocketError(JNIEnv *env, jint errorValue); 55 jint handleSocketErrorWithDefault(JNIEnv *env, jint errorValue,
|
java_util_zip_ZipFile.c | 58 static void ZipFile_initIDs(JNIEnv *env) 60 jclass cls = (*env)->FindClass(env, "java/util/zip/ZipFile"); 61 jzfileID = (*env)->GetFieldID(env, cls, "jzfile", "J"); 70 ThrowZipException(JNIEnv *env, const char *msg) 76 s = JNU_NewStringPlatform(env, msg); 78 x = JNU_NewObjectByName(env, 82 (*env)->Throw(env, x) [all...] |
/frameworks/base/core/jni/android/graphics/ |
Movie.cpp | 22 jobject create_jmovie(JNIEnv* env, SkMovie* moov) { 26 return env->NewObject(gMovie_class, gMovie_constructorMethodID, 30 static SkMovie* J2Movie(JNIEnv* env, jobject movie) { 31 SkASSERT(env); 33 SkASSERT(env->IsInstanceOf(movie, gMovie_class)); 34 SkMovie* m = (SkMovie*)env->GetLongField(movie, gMovie_nativeInstanceID); 41 static jint movie_width(JNIEnv* env, jobject movie) { 42 NPE_CHECK_RETURN_ZERO(env, movie); 43 return static_cast<jint>(J2Movie(env, movie)->width()); 46 static jint movie_height(JNIEnv* env, jobject movie) [all...] |
SurfaceTexture.cpp | 79 static void SurfaceTexture_setSurfaceTexture(JNIEnv* env, jobject thiz, 83 (GLConsumer*)env->GetLongField(thiz, fields.surfaceTexture); 90 env->SetLongField(thiz, fields.surfaceTexture, (jlong)surfaceTexture.get()); 93 static void SurfaceTexture_setProducer(JNIEnv* env, jobject thiz, 97 (IGraphicBufferProducer*)env->GetLongField(thiz, fields.producer); 104 env->SetLongField(thiz, fields.producer, (jlong)producer.get()); 107 static void SurfaceTexture_setFrameAvailableListener(JNIEnv* env, 112 env->GetLongField(thiz, fields.frameAvailableListener); 119 env->SetLongField(thiz, fields.frameAvailableListener, (jlong)listener.get()); 122 sp<GLConsumer> SurfaceTexture_getSurfaceTexture(JNIEnv* env, jobject thiz) 167 JNIEnv* env = AndroidRuntime::getJNIEnv(); local 193 JNIEnv* env = getJNIEnv(&needsDetach); local 208 JNIEnv* env = getJNIEnv(&needsDetach); local [all...] |
/frameworks/base/services/core/jni/ |
com_android_server_UsbHostManager.cpp | 50 static void checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { 51 if (env->ExceptionCheck()) { 53 LOGE_EX(env); 54 env->ExceptionClear(); 68 JNIEnv* env = AndroidRuntime::getJNIEnv(); local 77 jstring deviceName = env->NewStringUTF(devname); 78 jstring manufacturerName = AndroidRuntime::NewStringLatin1(env, manufacturer); 79 jstring productName = AndroidRuntime::NewStringLatin1(env, product); 80 jstring serialNumber = AndroidRuntime::NewStringLatin1(env, serial); 82 jboolean result = env->CallBooleanMethod(thiz, method_beginUsbDeviceAdded 142 JNIEnv* env = AndroidRuntime::getJNIEnv(); local [all...] |
/external/valgrind/VEX/priv/ |
host_s390_isel.c | 174 addInstr(ISelEnv *env, s390_insn *insn) 176 addHInstr(env->code, insn); 197 lookupIRTemp(ISelEnv *env, IRTemp tmp) 199 vassert(tmp < env->n_vregmap); 200 vassert(! hregIsInvalid(env->vregmap[tmp])); 202 return env->vregmap[tmp]; 208 lookupIRTemp128(HReg *hi, HReg *lo, ISelEnv *env, IRTemp tmp) 210 vassert(tmp < env->n_vregmap); 211 vassert(! hregIsInvalid(env->vregmapHI[tmp])); 213 *lo = env->vregmap[tmp] 4101 ISelEnv *env; local [all...] |
/frameworks/base/core/jni/ |
android_net_LocalSocketImpl.cpp | 55 socket_connect_local(JNIEnv *env, jobject object, 61 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); 63 if (env->ExceptionCheck()) { 67 ScopedUtfChars nameUtf8(env, name); 76 jniThrowIOException(env, errno); 88 socket_bind_local (JNIEnv *env, jobject object, jobject fileDescriptor, 95 jniThrowNullPointerException(env, NULL); 99 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); 101 if (env->ExceptionCheck()) { 105 ScopedUtfChars nameUtf8(env, name) [all...] |
android_view_MotionEvent.cpp | 68 MotionEvent* android_view_MotionEvent_getNativePtr(JNIEnv* env, jobject eventObj) { 73 env->GetLongField(eventObj, gMotionEventClassInfo.mNativePtr)); 76 static void android_view_MotionEvent_setNativePtr(JNIEnv* env, jobject eventObj, 78 env->SetLongField(eventObj, gMotionEventClassInfo.mNativePtr, 82 jobject android_view_MotionEvent_obtainAsCopy(JNIEnv* env, const MotionEvent* event) { 83 jobject eventObj = env->CallStaticObjectMethod(gMotionEventClassInfo.clazz, 85 if (env->ExceptionCheck() || !eventObj) { 87 LOGE_EX(env); 88 env->ExceptionClear(); 92 MotionEvent* destEvent = android_view_MotionEvent_getNativePtr(env, eventObj) [all...] |
android_hardware_UsbDevice.cpp | 30 android_hardware_UsbDevice_get_device_id(JNIEnv *env, jobject clazz, jstring name) 32 const char *nameStr = env->GetStringUTFChars(name, NULL); 34 env->ReleaseStringUTFChars(name, nameStr); 39 android_hardware_UsbDevice_get_device_name(JNIEnv *env, jobject clazz, jint id) 42 jstring result = env->NewStringUTF(name); 55 int register_android_hardware_UsbDevice(JNIEnv *env) 57 return RegisterMethodsOrDie(env, "android/hardware/usb/UsbDevice",
|
android_util_MemoryIntArray.cpp | 24 static jint android_util_MemoryIntArray_create(JNIEnv* env, jobject clazz, jstring name, 28 jniThrowException(env, "java/io/IOException", "bad name"); 33 jniThrowException(env, "java/io/IOException", "bad size"); 37 const char* nameStr = env->GetStringUTFChars(name, NULL); 40 env->ReleaseStringUTFChars(name, nameStr); 43 jniThrowException(env, "java/io/IOException", "ashmem creation failed"); 49 jniThrowException(env, "java/io/IOException", "cannot set ashmem prot mode"); 56 static jlong android_util_MemoryIntArray_open(JNIEnv* env, jobject clazz, jint fd, 60 jniThrowException(env, "java/io/IOException", "bad file descriptor"); 66 jniThrowException(env, "java/io/IOException", "bad ashmem size") [all...] |
android_hardware_Radio.cpp | 140 static sp<Radio> getRadio(JNIEnv* env, jobject thiz) 143 Radio* const radio = (Radio*)env->GetLongField(thiz, gModuleFields.mNativeContext); 147 static sp<Radio> setRadio(JNIEnv* env, jobject thiz, const sp<Radio>& module) 150 sp<Radio> old = (Radio*)env->GetLongField(thiz, gModuleFields.mNativeContext); 157 env->SetLongField(thiz, gModuleFields.mNativeContext, (jlong)module.get()); 161 static jint convertBandDescriptorFromNative(JNIEnv *env, 169 *jBandDescriptor = env->NewObject(gRadioFmBandDescriptorClass, gRadioFmBandDescriptorCstor, 179 *jBandDescriptor = env->NewObject(gRadioAmBandDescriptorClass, gRadioAmBandDescriptorCstor, 196 static jint convertBandConfigFromNative(JNIEnv *env, 204 *jBandConfig = env->NewObject(gRadioFmBandConfigClass, gRadioFmBandConfigCstor 501 JNIEnv *env = AndroidRuntime::getJNIEnv(); local 511 JNIEnv *env = AndroidRuntime::getJNIEnv(); local [all...] |
/development/samples/SimpleJNI/jni/ |
native.cpp | 25 add(JNIEnv *env, jobject thiz, jint a, jint b) { 40 static int registerNativeMethods(JNIEnv* env, const char* className, 45 clazz = env->FindClass(className); 50 if (env->RegisterNatives(clazz, gMethods, numMethods) < 0) { 63 static int registerNatives(JNIEnv* env) 65 if (!registerNativeMethods(env, classPathName, 81 JNIEnv* env; member in union:__anon2772 90 JNIEnv* env = NULL; local 98 env = uenv.env; [all...] |
/external/autotest/client/site_tests/cellular_Throughput/ |
cellular_Throughput.py | 21 env = c.env 23 env.StartDefault(technology) 33 env.emulator.ClearErrors() 35 service = env.CheckedConnectToCellular() 39 env.emulator.LogStats() 40 env.emulator.ResetDataCounters() 43 env.config.cell['perfserver']['download_url_format_string'], 44 env.config.cell['perfserver']['upload_url']) 49 env.emulator.GetDataCounters( [all...] |
/external/conscrypt/src/openjdk/native/ |
JNIHelp.h | 45 int jniRegisterNativeMethods(JNIEnv* env, const char* className, const JNINativeMethod* gMethods, int numMethods); 61 int jniThrowException(JNIEnv* env, const char* className, const char* msg); 66 int jniThrowNullPointerException(JNIEnv* env, const char* msg); 71 int jniThrowRuntimeException(JNIEnv* env, const char* msg); 76 int jniThrowIOException(JNIEnv* env, int errnum); 89 jobject jniCreateFileDescriptor(JNIEnv* env, int fd); 94 int jniGetFDFromFileDescriptor(JNIEnv* env, jobject fileDescriptor); 99 void jniSetFileDescriptorOfFD(JNIEnv* env, jobject fileDescriptor, int value); 104 jobject jniGetReferent(JNIEnv* env, jobject ref); 110 void jniLogException(JNIEnv* env, int priority, const char* tag, jthrowable exception) [all...] |
/libnativehelper/include/nativehelper/ |
toStringArray.h | 26 jobjectArray newStringArray(JNIEnv* env, size_t count); 29 jobjectArray toStringArray(JNIEnv* env, Counter* counter, Getter* getter) { 31 jobjectArray result = newStringArray(env, count); 36 ScopedLocalRef<jstring> s(env, env->NewStringUTF((*getter)(i))); 37 if (env->ExceptionCheck()) { 40 env->SetObjectArrayElement(result, i, s.get()); 41 if (env->ExceptionCheck()) { 63 inline jobjectArray toStringArray(JNIEnv* env, const std::vector<std::string>& strings) { 66 return toStringArray<VectorCounter, VectorGetter>(env, &counter, &getter) [all...] |
/cts/tests/tests/security/jni/ |
android_security_cts_SELinuxTest.cpp | 41 static jstring getFileContext(JNIEnv *env, jobject, jstring pathStr) { 42 ScopedUtfChars path(env, pathStr); 51 ScopedLocalRef<jstring> securityString(env, NULL); 53 securityString.reset(env->NewStringUTF(context.get())); 64 int register_android_security_cts_SELinuxTest(JNIEnv* env) 66 jclass clazz = env->FindClass("android/security/cts/SELinuxTest"); 68 return env->RegisterNatives(clazz, gMethods,
|