Index: libadblockplus-android/jni/JniLibrary.cpp |
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java b/libadblockplus-android/jni/JniLibrary.cpp |
similarity index 58% |
copy from libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java |
copy to libadblockplus-android/jni/JniLibrary.cpp |
index 7e655ba71e65c7a8bfbfe9a4fa9c6b30a385ba55..7bd57987905223c8bd2410d5a7286c0e36fcab4a 100644 |
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java |
+++ b/libadblockplus-android/jni/JniLibrary.cpp |
@@ -15,24 +15,30 @@ |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
-package org.adblockplus.libadblockplus; |
+#include "JniJsValue.h" |
-public class AdblockPlusException extends RuntimeException |
-{ |
- private static final long serialVersionUID = -8127654134450836743L; |
+#define JNI_REQUIRED_VERSION (JNI_VERSION_1_6) |
Felix Dahlke
2016/09/15 15:05:56
I actually just noticed that there is already a de
anton
2016/09/16 05:48:44
Acknowledged.
|
- public AdblockPlusException(final String message) |
+jint JNI_OnLoad(JavaVM* vm, void* reserved) |
+{ |
+ JNIEnv* env; |
+ if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_REQUIRED_VERSION) != JNI_OK) |
{ |
- super(message); |
+ return JNI_ERR; |
} |
- public AdblockPlusException(final String message, final Throwable throwable) |
- { |
- super(message, throwable); |
- } |
+ JniJsValue_OnLoad(vm, env, reserved); |
- public AdblockPlusException(final Throwable throwable) |
+ return JNI_REQUIRED_VERSION; |
+} |
+ |
+void JNI_OnUnload(JavaVM* vm, void* reserved) |
+{ |
+ JNIEnv* env; |
+ if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_REQUIRED_VERSION) != JNI_OK) |
{ |
- super(throwable); |
+ return; |
} |
-} |
+ |
+ JniJsValue_OnUnload(vm, env, reserved); |
+} |