Home
last modified time | relevance | path

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

12345678910>>...18

/frameworks/base/services/core/jni/
Donload.cpp26 int register_android_server_AlarmManagerService(JNIEnv* env);
27 int register_android_server_BatteryStatsService(JNIEnv* env);
28 int register_android_server_ConsumerIrService(JNIEnv *env);
29 int register_android_server_InputApplicationHandle(JNIEnv* env);
30 int register_android_server_InputWindowHandle(JNIEnv* env);
31 int register_android_server_InputManager(JNIEnv* env);
32 int register_android_server_LightsService(JNIEnv* env);
33 int register_android_server_PowerManagerService(JNIEnv* env);
34 int register_android_server_storage_AppFuse(JNIEnv* env);
35 int register_android_server_SerialService(JNIEnv* env);
[all …]
/frameworks/base/media/jni/
Dandroid_media_MediaRecorder.cpp52 extern sp<Camera> get_native_camera(JNIEnv *env, jobject thiz, struct JNICameraContext** context);
54 android_media_MediaCodec_getPersistentInputSurface(JNIEnv* env, jobject object);
71 JNIMediaRecorderListener(JNIEnv* env, jobject thiz, jobject weak_thiz);
80 JNIMediaRecorderListener::JNIMediaRecorderListener(JNIEnv* env, jobject thiz, jobject weak_thiz) in JNIMediaRecorderListener() argument
85 jclass clazz = env->GetObjectClass(thiz); in JNIMediaRecorderListener()
88 jniThrowException(env, "java/lang/Exception", NULL); in JNIMediaRecorderListener()
91 mClass = (jclass)env->NewGlobalRef(clazz); in JNIMediaRecorderListener()
95 mObject = env->NewGlobalRef(weak_thiz); in JNIMediaRecorderListener()
101 JNIEnv *env = AndroidRuntime::getJNIEnv(); in ~JNIMediaRecorderListener() local
102 env->DeleteGlobalRef(mObject); in ~JNIMediaRecorderListener()
[all …]
Dandroid_media_MediaPlayer.cpp62 var = env->FindClass(className); \
66 var = env->GetMethodID(clazz, fieldName, fieldDescriptor); \
107 JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz);
116 JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobject weak_thiz) in JNIMediaPlayerListener() argument
121 jclass clazz = env->GetObjectClass(thiz); in JNIMediaPlayerListener()
124 jniThrowException(env, "java/lang/Exception", NULL); in JNIMediaPlayerListener()
127 mClass = (jclass)env->NewGlobalRef(clazz); in JNIMediaPlayerListener()
131 mObject = env->NewGlobalRef(weak_thiz); in JNIMediaPlayerListener()
137 JNIEnv *env = AndroidRuntime::getJNIEnv(); in ~JNIMediaPlayerListener() local
138 env->DeleteGlobalRef(mObject); in ~JNIMediaPlayerListener()
[all …]
Dandroid_mtp_MtpDevice.cpp112 JavaArrayWriter(JNIEnv* env, jbyteArray array) : in JavaArrayWriter() argument
113 mEnv(env), mArray(array), mSize(mEnv->GetArrayLength(mArray)) {} in JavaArrayWriter()
133 MtpDevice* get_device_from_object(JNIEnv* env, jobject javaDevice) in get_device_from_object() argument
135 return (MtpDevice*)env->GetLongField(javaDevice, field_context); in get_device_from_object()
138 void fill_jobject_from_object_info(JNIEnv* env, jobject object, MtpObjectInfo* objectInfo) { in fill_jobject_from_object_info() argument
140 env->SetIntField(object, field_objectInfo_handle, objectInfo->mHandle); in fill_jobject_from_object_info()
142 env->SetIntField(object, field_objectInfo_storageId, objectInfo->mStorageID); in fill_jobject_from_object_info()
144 env->SetIntField(object, field_objectInfo_format, objectInfo->mFormat); in fill_jobject_from_object_info()
146 env->SetIntField(object, field_objectInfo_protectionStatus, objectInfo->mProtectionStatus); in fill_jobject_from_object_info()
148 env->SetIntField(object, field_objectInfo_compressedSize, objectInfo->mCompressedSize); in fill_jobject_from_object_info()
[all …]
Dandroid_media_MediaDrm.cpp40 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) in JNIDrmListener() argument
171 jclass clazz = env->GetObjectClass(thiz); in JNIDrmListener()
174 jniThrowException(env, "java/lang/Exception", in JNIDrmListener()
178 mClass = (jclass)env->NewGlobalRef(clazz); in JNIDrmListener()
[all …]
Dandroid_media_MediaCodec.cpp122 JNIEnv *env, jobject thiz, in JMediaCodec() argument
126 jclass clazz = env->GetObjectClass(thiz); in JMediaCodec()
129 mClass = (jclass)env->NewGlobalRef(clazz); in JMediaCodec()
130 mObject = env->NewWeakGlobalRef(thiz); in JMediaCodec()
132 cacheJavaObjects(env); in JMediaCodec()
150 void JMediaCodec::cacheJavaObjects(JNIEnv *env) { in cacheJavaObjects() argument
151 jclass clazz = (jclass)env->FindClass("java/nio/ByteBuffer"); in cacheJavaObjects()
152 mByteBufferClass = (jclass)env->NewGlobalRef(clazz); in cacheJavaObjects()
156 env, env->FindClass("java/nio/ByteOrder")); in cacheJavaObjects()
159 jmethodID nativeOrderID = env->GetStaticMethodID( in cacheJavaObjects()
[all …]
Dandroid_media_MediaExtractor.cpp58 JMediaExtractor::JMediaExtractor(JNIEnv *env, jobject thiz) in JMediaExtractor() argument
61 jclass clazz = env->GetObjectClass(thiz); in JMediaExtractor()
64 mClass = (jclass)env->NewGlobalRef(clazz); in JMediaExtractor()
65 mObject = env->NewWeakGlobalRef(thiz); in JMediaExtractor()
71 JNIEnv *env = AndroidRuntime::getJNIEnv(); in ~JMediaExtractor() local
73 env->DeleteWeakGlobalRef(mObject); in ~JMediaExtractor()
75 env->DeleteGlobalRef(mClass); in ~JMediaExtractor()
94 status_t JMediaExtractor::setMediaCas(JNIEnv *env, jobject casBinderObj) { in setMediaCas() argument
100 JHwRemoteBinder::GetNativeContext(env, casBinderObj)->getBinder(); in setMediaCas()
129 JNIEnv *env = AndroidRuntime::getJNIEnv(); in getTrackFormat() local
[all …]
Dandroid_mtp_MtpDatabase.cpp91 MtpDatabase* getMtpDatabase(JNIEnv *env, jobject database) { in getMtpDatabase() argument
92 return (MtpDatabase *)env->GetLongField(database, field_context); in getMtpDatabase()
105 MyMtpDatabase(JNIEnv *env, jobject client);
107 void cleanup(JNIEnv *env);
188 static void checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { in checkAndClearExceptionFromCallback() argument
189 if (env->ExceptionCheck()) { in checkAndClearExceptionFromCallback()
191 LOGE_EX(env); in checkAndClearExceptionFromCallback()
192 env->ExceptionClear(); in checkAndClearExceptionFromCallback()
198 MyMtpDatabase::MyMtpDatabase(JNIEnv *env, jobject client) in MyMtpDatabase() argument
199 : mDatabase(env->NewGlobalRef(client)), in MyMtpDatabase()
[all …]
Dandroid_mtp_MtpServer.cpp53 extern MtpDatabase* getMtpDatabase(JNIEnv *env, jobject database);
55 static inline MtpServer* getMtpServer(JNIEnv *env, jobject thiz) { in getMtpServer() argument
56 return (MtpServer*)env->GetLongField(thiz, field_MtpServer_nativeContext); in getMtpServer()
64 android_mtp_MtpServer_setup(JNIEnv *env, jobject thiz, jobject javaDatabase, jboolean usePtp, in android_mtp_MtpServer_setup() argument
70 const char *deviceInfoManufacturerStr = env->GetStringUTFChars(deviceInfoManufacturer, NULL); in android_mtp_MtpServer_setup()
71 const char *deviceInfoModelStr = env->GetStringUTFChars(deviceInfoModel, NULL); in android_mtp_MtpServer_setup()
72 const char *deviceInfoDeviceVersionStr = env->GetStringUTFChars(deviceInfoDeviceVersion, NULL); in android_mtp_MtpServer_setup()
73 const char *deviceInfoSerialNumberStr = env->GetStringUTFChars(deviceInfoSerialNumber, NULL); in android_mtp_MtpServer_setup()
74 MtpServer* server = new MtpServer(getMtpDatabase(env, javaDatabase), in android_mtp_MtpServer_setup()
81 env->ReleaseStringUTFChars(deviceInfoManufacturer, deviceInfoManufacturerStr); in android_mtp_MtpServer_setup()
[all …]
/frameworks/base/core/jni/android/graphics/
DGraphics.cpp23 void doThrowNPE(JNIEnv* env) { in doThrowNPE() argument
24 jniThrowNullPointerException(env, NULL); in doThrowNPE()
27 void doThrowAIOOBE(JNIEnv* env) { in doThrowAIOOBE() argument
28 jniThrowException(env, "java/lang/ArrayIndexOutOfBoundsException", NULL); in doThrowAIOOBE()
31 void doThrowRE(JNIEnv* env, const char* msg) { in doThrowRE() argument
32 jniThrowRuntimeException(env, msg); in doThrowRE()
35 void doThrowIAE(JNIEnv* env, const char* msg) { in doThrowIAE() argument
36 jniThrowException(env, "java/lang/IllegalArgumentException", msg); in doThrowIAE()
39 void doThrowISE(JNIEnv* env, const char* msg) { in doThrowISE() argument
40 jniThrowException(env, "java/lang/IllegalStateException", msg); in doThrowISE()
[all …]
DSurfaceTexture.cpp82 static void SurfaceTexture_setSurfaceTexture(JNIEnv* env, jobject thiz, in SurfaceTexture_setSurfaceTexture() argument
86 (GLConsumer*)env->GetLongField(thiz, fields.surfaceTexture); in SurfaceTexture_setSurfaceTexture()
93 env->SetLongField(thiz, fields.surfaceTexture, (jlong)surfaceTexture.get()); in SurfaceTexture_setSurfaceTexture()
96 static void SurfaceTexture_setProducer(JNIEnv* env, jobject thiz, in SurfaceTexture_setProducer() argument
100 (IGraphicBufferProducer*)env->GetLongField(thiz, fields.producer); in SurfaceTexture_setProducer()
107 env->SetLongField(thiz, fields.producer, (jlong)producer.get()); in SurfaceTexture_setProducer()
110 static void SurfaceTexture_setFrameAvailableListener(JNIEnv* env, in SurfaceTexture_setFrameAvailableListener() argument
115 env->GetLongField(thiz, fields.frameAvailableListener); in SurfaceTexture_setFrameAvailableListener()
122 env->SetLongField(thiz, fields.frameAvailableListener, (jlong)listener.get()); in SurfaceTexture_setFrameAvailableListener()
125 sp<GLConsumer> SurfaceTexture_getSurfaceTexture(JNIEnv* env, jobject thiz) { in SurfaceTexture_getSurfaceTexture() argument
[all …]
/frameworks/base/drm/jni/
Dandroid_drm_DrmManagerClient.cpp47 static String8 getStringValue(JNIEnv* env, jobject object, const char* fieldName);
50 JNIEnv* env, jobject object, const char* fieldName, int* dataLength);
53 JNIEnv* env, jbyteArray byteArray, int* dataLength);
55 static String8 getStringValue(JNIEnv* env, jstring string);
57 static int getIntValue(JNIEnv* env, jobject object, const char* fieldName);
60 String8 Utility::getStringValue(JNIEnv* env, jobject object, const char* fieldName) { in getStringValue() argument
63 = env->GetFieldID(env->GetObjectClass(object), fieldName , "Ljava/lang/String;"); in getStringValue()
66 jstring valueString = (jstring) env->GetObjectField(object, fieldID); in getStringValue()
67 return Utility::getStringValue(env, valueString); in getStringValue()
74 String8 Utility::getStringValue(JNIEnv* env, jstring string) { in getStringValue() argument
[all …]
/frameworks/base/services/core/jni/BroadcastRadio/
Dconvert.cpp51 static JavaRef<jobject> BandDescriptorFromHal(JNIEnv *env, const RegionalBandConfig &config);
52 static JavaRef<jobject> BandDescriptorFromHal(JNIEnv *env, const V1_0::BandConfig &config, Region r…
151 bool ThrowIfFailed(JNIEnv *env, const hardware::Return<void> &hidlResult) { in ThrowIfFailed() argument
152 return __ThrowIfFailedHidl(env, hidlResult); in ThrowIfFailed()
155 bool __ThrowIfFailedHidl(JNIEnv *env, const hardware::details::return_status &hidlResult) { in __ThrowIfFailedHidl() argument
158 ThrowParcelableRuntimeException(env, "HIDL call failed: " + hidlResult.description()); in __ThrowIfFailedHidl()
162 bool __ThrowIfFailed(JNIEnv *env, const Result halResult) { in __ThrowIfFailed() argument
167 ThrowParcelableRuntimeException(env, "Result::NOT_INITIALIZED"); in __ThrowIfFailed()
170 jniThrowException(env, "java/lang/IllegalArgumentException", in __ThrowIfFailed()
174 jniThrowException(env, "java/lang/IllegalStateException", "Result::INVALID_STATE"); in __ThrowIfFailed()
[all …]
/frameworks/base/core/jni/
Dandroid_hardware_SoundTrigger.cpp171 JNISoundTriggerCallback(JNIEnv* env, jobject thiz, jobject weak_thiz);
184 JNISoundTriggerCallback::JNISoundTriggerCallback(JNIEnv* env, jobject thiz, jobject weak_thiz) in JNISoundTriggerCallback() argument
189 jclass clazz = env->GetObjectClass(thiz); in JNISoundTriggerCallback()
194 mClass = (jclass)env->NewGlobalRef(clazz); in JNISoundTriggerCallback()
198 mObject = env->NewGlobalRef(weak_thiz); in JNISoundTriggerCallback()
204 JNIEnv *env = AndroidRuntime::getJNIEnv(); in ~JNISoundTriggerCallback() local
205 env->DeleteGlobalRef(mObject); in ~JNISoundTriggerCallback()
206 env->DeleteGlobalRef(mClass); in ~JNISoundTriggerCallback()
211 JNIEnv *env = AndroidRuntime::getJNIEnv(); in onRecognitionEvent() local
216 jData = env->NewByteArray(event->data_size); in onRecognitionEvent()
[all …]
Dandroid_util_Binder.cpp153 static void incRefsCreated(JNIEnv* env) in incRefsCreated() argument
158 env->CallStaticVoidMethod(gBinderInternalOffsets.mClass, in incRefsCreated()
165 static JavaVM* jnienv_to_javavm(JNIEnv* env) in jnienv_to_javavm() argument
168 return env->GetJavaVM(&vm) >= 0 ? vm : NULL; in jnienv_to_javavm()
173 JNIEnv* env; in javavm_to_jnienv() local
174 return vm->GetEnv((void **)&env, JNI_VERSION_1_4) >= 0 ? env : NULL; in javavm_to_jnienv()
178 static void report_java_lang_error(JNIEnv* env, jthrowable error) in report_java_lang_error() argument
181 jobject thread = env->CallStaticObjectMethod(gThreadDispatchOffsets.mClass, in report_java_lang_error()
184 env->CallVoidMethod(thread, gThreadDispatchOffsets.mDispatchUncaughtException, in report_java_lang_error()
191 env->ExceptionClear(); in report_java_lang_error()
[all …]
Dandroid_media_AudioSystem.cpp182 JNIAudioPortCallback(JNIEnv* env, jobject thiz, jobject weak_thiz);
196 JNIAudioPortCallback::JNIAudioPortCallback(JNIEnv* env, jobject thiz, jobject weak_thiz) in JNIAudioPortCallback() argument
201 jclass clazz = env->GetObjectClass(thiz); in JNIAudioPortCallback()
206 mClass = (jclass)env->NewGlobalRef(clazz); in JNIAudioPortCallback()
210 mObject = env->NewGlobalRef(weak_thiz); in JNIAudioPortCallback()
216 JNIEnv *env = AndroidRuntime::getJNIEnv(); in ~JNIAudioPortCallback() local
217 if (env == NULL) { in ~JNIAudioPortCallback()
220 env->DeleteGlobalRef(mObject); in ~JNIAudioPortCallback()
221 env->DeleteGlobalRef(mClass); in ~JNIAudioPortCallback()
226 JNIEnv *env = AndroidRuntime::getJNIEnv(); in sendEvent() local
[all …]
Dandroid_hardware_Camera.cpp74 JNICameraContext(JNIEnv* env, jobject weak_this, jclass clazz, const sp<Camera>& camera);
84 void postMetadata(JNIEnv *env, int32_t msgType, camera_frame_metadata_t *metadata);
85 void addCallbackBuffer(JNIEnv *env, jbyteArray cbb, int msgType);
86 void setCallbackMode(JNIEnv *env, bool installed, bool manualMode);
92 void copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int msgType);
93 void clearCallbackBuffers_l(JNIEnv *env, Vector<jbyteArray> *buffers);
94 void clearCallbackBuffers_l(JNIEnv *env);
95 jbyteArray getCallbackBuffer(JNIEnv *env, Vector<jbyteArray> *buffers, size_t bufferSize);
130 sp<Camera> get_native_camera(JNIEnv *env, jobject thiz, JNICameraContext** pContext) in get_native_camera() argument
134 …JNICameraContext* context = reinterpret_cast<JNICameraContext*>(env->GetLongField(thiz, fields.con… in get_native_camera()
[all …]
Dandroid_net_LocalSocketImpl.cpp55 socket_connect_local(JNIEnv *env, jobject object, in socket_connect_local() argument
61 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in socket_connect_local()
63 if (env->ExceptionCheck()) { in socket_connect_local()
67 ScopedUtfChars nameUtf8(env, name); in socket_connect_local()
76 jniThrowIOException(env, errno); in socket_connect_local()
88 socket_bind_local (JNIEnv *env, jobject object, jobject fileDescriptor, in socket_bind_local() argument
95 jniThrowNullPointerException(env, NULL); in socket_bind_local()
99 fd = jniGetFDFromFileDescriptor(env, fileDescriptor); in socket_bind_local()
101 if (env->ExceptionCheck()) { in socket_bind_local()
105 ScopedUtfChars nameUtf8(env, name); in socket_bind_local()
[all …]
DAndroidRuntime.cpp53 extern int register_android_os_Binder(JNIEnv* env);
54 extern int register_android_os_Process(JNIEnv* env);
58 extern int register_android_graphics_Camera(JNIEnv* env);
59 extern int register_android_graphics_CreateJavaOutputStreamAdaptor(JNIEnv* env);
60 extern int register_android_graphics_GraphicBuffer(JNIEnv* env);
61 extern int register_android_graphics_Graphics(JNIEnv* env);
62 extern int register_android_graphics_Interpolator(JNIEnv* env);
63 extern int register_android_graphics_MaskFilter(JNIEnv* env);
64 extern int register_android_graphics_Movie(JNIEnv* env);
66 extern int register_android_graphics_PathEffect(JNIEnv* env);
[all …]
Dandroid_os_HwParcel.cpp52 void signalExceptionForError(JNIEnv *env, status_t err, bool canThrowRemoteException) { in signalExceptionForError() argument
59 jniThrowException(env, "java/lang/OutOfMemoryError", NULL); in signalExceptionForError()
66 env, "java/lang/UnsupportedOperationException", NULL); in signalExceptionForError()
72 jniThrowException(env, "java/lang/IllegalArgumentException", NULL); in signalExceptionForError()
79 jniThrowException(env, "java/lang/IndexOutOfBoundsException", NULL); in signalExceptionForError()
85 jniThrowException(env, "java/lang/IllegalArgumentException", NULL); in signalExceptionForError()
91 jniThrowException(env, "java/util/NoSuchElementException", NULL); in signalExceptionForError()
97 jniThrowException(env, "java/lang/SecurityException", NULL); in signalExceptionForError()
104 env, "java/lang/RuntimeException", "Not initialized"); in signalExceptionForError()
111 env, "java/lang/RuntimeException", "Item already exists"); in signalExceptionForError()
[all …]
Dandroid_view_InputChannel.cpp52 void invokeAndRemoveDisposeCallback(JNIEnv* env, jobject obj);
74 void NativeInputChannel::invokeAndRemoveDisposeCallback(JNIEnv* env, jobject obj) { in invokeAndRemoveDisposeCallback() argument
76 mDisposeCallback(env, obj, mInputChannel, mDisposeData); in invokeAndRemoveDisposeCallback()
84 static NativeInputChannel* android_view_InputChannel_getNativeInputChannel(JNIEnv* env, in android_view_InputChannel_getNativeInputChannel() argument
86 jlong longPtr = env->GetLongField(inputChannelObj, gInputChannelClassInfo.mPtr); in android_view_InputChannel_getNativeInputChannel()
90 static void android_view_InputChannel_setNativeInputChannel(JNIEnv* env, jobject inputChannelObj, in android_view_InputChannel_setNativeInputChannel() argument
92 env->SetLongField(inputChannelObj, gInputChannelClassInfo.mPtr, in android_view_InputChannel_setNativeInputChannel()
96 sp<InputChannel> android_view_InputChannel_getInputChannel(JNIEnv* env, jobject inputChannelObj) { in android_view_InputChannel_getInputChannel() argument
98 android_view_InputChannel_getNativeInputChannel(env, inputChannelObj); in android_view_InputChannel_getInputChannel()
102 void android_view_InputChannel_setDisposeCallback(JNIEnv* env, jobject inputChannelObj, in android_view_InputChannel_setDisposeCallback() argument
[all …]
Dandroid_view_PointerIcon.cpp48 jobject android_view_PointerIcon_getSystemIcon(JNIEnv* env, jobject contextObj, int32_t style) { in android_view_PointerIcon_getSystemIcon() argument
49 jobject pointerIconObj = env->CallStaticObjectMethod(gPointerIconClassInfo.clazz, in android_view_PointerIcon_getSystemIcon()
51 if (env->ExceptionCheck()) { in android_view_PointerIcon_getSystemIcon()
53 LOGW_EX(env); in android_view_PointerIcon_getSystemIcon()
54 env->ExceptionClear(); in android_view_PointerIcon_getSystemIcon()
60 status_t android_view_PointerIcon_load(JNIEnv* env, jobject pointerIconObj, jobject contextObj, in android_view_PointerIcon_load() argument
68 ScopedLocalRef<jobject> loadedPointerIconObj(env, env->CallObjectMethod(pointerIconObj, in android_view_PointerIcon_load()
70 if (env->ExceptionCheck() || !loadedPointerIconObj.get()) { in android_view_PointerIcon_load()
72 LOGW_EX(env); in android_view_PointerIcon_load()
73 env->ExceptionClear(); in android_view_PointerIcon_load()
[all …]
Dandroid_media_AudioTrack.cpp134 JNIEnv *env = AndroidRuntime::getJNIEnv(); in audioCallback() local
135 if (user != NULL && env != NULL) { in audioCallback()
136 env->CallStaticVoidMethod( in audioCallback()
140 if (env->ExceptionCheck()) { in audioCallback()
141 env->ExceptionDescribe(); in audioCallback()
142 env->ExceptionClear(); in audioCallback()
148 JNIEnv *env = AndroidRuntime::getJNIEnv(); in audioCallback() local
149 if (user != NULL && env != NULL) { in audioCallback()
150 env->CallStaticVoidMethod( in audioCallback()
154 if (env->ExceptionCheck()) { in audioCallback()
[all …]
/frameworks/base/media/mca/filterfw/jni/
Djni_util.cpp35 JavaObject::JavaObject(jobject object, JNIEnv* env)
39 object_ = env->NewGlobalRef(object_);
66 JNIEnv* env = GetCurrentJNIEnv();
67 if (!env)
70 env->DeleteGlobalRef(object_);
91 JNIEnv* env = NULL;
92 const jint result = vm->GetEnv(reinterpret_cast<void**>(&env),
94 return result == JNI_OK ? env : NULL;
98 jstring ToJString(JNIEnv* env, const std::string& value) { in ToJString() argument
99 return env->NewStringUTF(value.c_str()); in ToJString()
[all …]
/frameworks/base/media/jni/audioeffect/
Dandroid_media_AudioEffect.cpp111 JNIEnv *env = AndroidRuntime::getJNIEnv(); in effectCallback() local
118 if (!user || !env) { in effectCallback()
119 ALOGW("effectCallback error user %p, env %p", user, env); in effectCallback()
154 array = env->NewByteArray(size); in effectCallback()
159 bytes = env->GetByteArrayElements(array, NULL); in effectCallback()
161 env->ReleaseByteArrayElements(array, bytes, 0); in effectCallback()
170 env->CallStaticVoidMethod( in effectCallback()
177 env->DeleteLocalRef(array); in effectCallback()
180 if (env->ExceptionCheck()) { in effectCallback()
181 env->ExceptionDescribe(); in effectCallback()
[all …]

12345678910>>...18