Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android/jni/JniLibrary.cpp

Issue 29345737: Issue 4146 - Fix failing UpdateCheckTest.testApplicationUpdateAvailable test in libadblockplus-andr… (Closed)
Patch Set: using jni version define from Utils.h Created Sept. 16, 2016, 6:30 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libadblockplus-android/jni/JniJsValue.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61%
copy from libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java
copy to libadblockplus-android/jni/JniLibrary.cpp
index 7e655ba71e65c7a8bfbfe9a4fa9c6b30a385ba55..866e8f9745293b0cf2e902c6c1819636e0c63505 100644
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java
+++ b/libadblockplus-android/jni/JniLibrary.cpp
@@ -15,24 +15,28 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.adblockplus.libadblockplus;
+#include "JniJsValue.h"
anton 2016/09/16 11:06:04 added #include "Utils.h" for ABP_JNI_VERSION to be
-public class AdblockPlusException extends RuntimeException
+jint JNI_OnLoad(JavaVM* vm, void* reserved)
{
- private static final long serialVersionUID = -8127654134450836743L;
-
- public AdblockPlusException(final String message)
+ JNIEnv* env;
+ if (vm->GetEnv(reinterpret_cast<void**>(&env), ABP_JNI_VERSION) != JNI_OK)
{
- super(message);
+ return JNI_ERR;
}
- public AdblockPlusException(final String message, final Throwable throwable)
- {
- super(message, throwable);
- }
+ JniJsValue_OnLoad(vm, env, reserved);
+
+ return ABP_JNI_VERSION;
+}
- public AdblockPlusException(final Throwable throwable)
+void JNI_OnUnload(JavaVM* vm, void* reserved)
+{
+ JNIEnv* env;
+ if (vm->GetEnv(reinterpret_cast<void**>(&env), ABP_JNI_VERSION) != JNI_OK)
{
- super(throwable);
+ return;
}
-}
+
+ JniJsValue_OnUnload(vm, env, reserved);
+}
« no previous file with comments | « libadblockplus-android/jni/JniJsValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld