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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « libadblockplus-android/jni/JniJsValue.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 package org.adblockplus.libadblockplus; 18 #include "JniJsValue.h"
19 19
anton 2016/09/16 11:06:04 added #include "Utils.h" for ABP_JNI_VERSION to be
20 public class AdblockPlusException extends RuntimeException 20 jint JNI_OnLoad(JavaVM* vm, void* reserved)
21 { 21 {
22 private static final long serialVersionUID = -8127654134450836743L; 22 JNIEnv* env;
23 23 if (vm->GetEnv(reinterpret_cast<void**>(&env), ABP_JNI_VERSION) != JNI_OK)
24 public AdblockPlusException(final String message)
25 { 24 {
26 super(message); 25 return JNI_ERR;
27 } 26 }
28 27
29 public AdblockPlusException(final String message, final Throwable throwable) 28 JniJsValue_OnLoad(vm, env, reserved);
29
30 return ABP_JNI_VERSION;
31 }
32
33 void JNI_OnUnload(JavaVM* vm, void* reserved)
34 {
35 JNIEnv* env;
36 if (vm->GetEnv(reinterpret_cast<void**>(&env), ABP_JNI_VERSION) != JNI_OK)
30 { 37 {
31 super(message, throwable); 38 return;
32 } 39 }
33 40
34 public AdblockPlusException(final Throwable throwable) 41 JniJsValue_OnUnload(vm, env, reserved);
35 { 42 }
36 super(throwable);
37 }
38 }
OLDNEW
« 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