[Android] libvlcjni: add VLCJNI_EX_RUNTIME
Thomas Guillem
git at videolan.org
Fri Aug 24 09:20:34 CEST 2018
vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Aug 22 14:38:44 2018 +0200| [2280b0b0940f6d36e41350e63e7d594be11d7400] | committer: Thomas Guillem
libvlcjni: add VLCJNI_EX_RUNTIME
> https://code.videolan.org/videolan/vlc-android/commit/2280b0b0940f6d36e41350e63e7d594be11d7400
---
libvlc/jni/libvlcjni-vlcobject.h | 4 ++++
libvlc/jni/libvlcjni.c | 3 +++
2 files changed, 7 insertions(+)
diff --git a/libvlc/jni/libvlcjni-vlcobject.h b/libvlc/jni/libvlcjni-vlcobject.h
index 1054cc100..0998b39cd 100644
--- a/libvlc/jni/libvlcjni-vlcobject.h
+++ b/libvlc/jni/libvlcjni-vlcobject.h
@@ -93,6 +93,7 @@ enum vlcjni_exception
{
VLCJNI_EX_ILLEGAL_STATE,
VLCJNI_EX_ILLEGAL_ARGUMENT,
+ VLCJNI_EX_RUNTIME,
VLCJNI_EX_OUT_OF_MEMORY,
};
@@ -112,6 +113,9 @@ static inline void throw_Exception(JNIEnv *env, enum vlcjni_exception type,
case VLCJNI_EX_ILLEGAL_STATE:
clazz = fields.IllegalStateException.clazz;
break;
+ case VLCJNI_EX_RUNTIME:
+ clazz = fields.RuntimeException.clazz;
+ break;
case VLCJNI_EX_OUT_OF_MEMORY:
clazz = fields.OutOfMemoryError.clazz;
break;
diff --git a/libvlc/jni/libvlcjni.c b/libvlc/jni/libvlcjni.c
index 18e57748b..1e474f204 100644
--- a/libvlc/jni/libvlcjni.c
+++ b/libvlc/jni/libvlcjni.c
@@ -145,6 +145,8 @@ int VLCJNI_OnLoad(JavaVM *vm, JNIEnv* env)
"java/lang/IllegalStateException", true);
GET_CLASS(fields.IllegalArgumentException.clazz,
"java/lang/IllegalArgumentException", true);
+ GET_CLASS(fields.RuntimeException.clazz,
+ "java/lang/RuntimeException", true);
GET_CLASS(fields.OutOfMemoryError.clazz,
"java/lang/OutOfMemoryError", true);
GET_CLASS(fields.String.clazz,
@@ -347,6 +349,7 @@ void VLCJNI_OnUnload(JavaVM *vm, JNIEnv *env)
{
(*env)->DeleteGlobalRef(env, fields.IllegalStateException.clazz);
(*env)->DeleteGlobalRef(env, fields.IllegalArgumentException.clazz);
+ (*env)->DeleteGlobalRef(env, fields.RuntimeException.clazz);
(*env)->DeleteGlobalRef(env, fields.OutOfMemoryError.clazz);
(*env)->DeleteGlobalRef(env, fields.String.clazz);
(*env)->DeleteGlobalRef(env, fields.VLCObject.clazz);
More information about the Android
mailing list