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

Unified Diff: libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java

Issue 29361445: Issue 4399 - Add WebView inheritor with ad blocking (Closed)
Patch Set: fixed 2 more members in AdblockEngine Created Dec. 16, 2016, 8:31 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
Index: libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java
diff --git a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockWebRequest.java b/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java
similarity index 68%
copy from libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockWebRequest.java
copy to libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java
index d92e47b05b8e7406c90f2e3e94c3088c2d64d167..d82146b7a04c780873f3171658e53b8f1ca56394 100644
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockWebRequest.java
+++ b/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java
@@ -15,16 +15,18 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-package org.adblockplus.libadblockplus;
+package org.adblockplus.libadblockplus.android.webviewapp;
-import java.util.List;
+import org.adblockplus.libadblockplus.android.settings.Adblock;
-public class MockWebRequest extends WebRequest
+public class Application extends android.app.Application
{
- public ServerResponse response = new ServerResponse();
+ @Override
+ public void onCreate()
+ {
+ super.onCreate();
- public ServerResponse httpGET(String url, List<HeaderEntry> headers)
- {
- return response;
- }
+ // init Adblock
+ Adblock.get().init(this, true, Adblock.PREFERENCE_NAME);
+ }
}

Powered by Google App Engine
This is Rietveld