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

Unified Diff: libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java

Issue 29389555: Issue 5010 - Allow to preload subscription files (Closed)
Patch Set: Created March 20, 2017, 8:11 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-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java
diff --git a/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java b/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java
index cac1ec3163b97f07a5ab7faa7614e3b8740f1d82..f0e48e1a871a42371cd94cfe93eb4c160a7ef547 100644
--- a/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java
+++ b/libadblockplus-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java
@@ -66,6 +66,9 @@ public class AdblockWebView extends WebView
{
private static final String TAG = Utils.getTag(AdblockWebView.class);
+ // basePath to store subscription files
+ public static final String BASE_PATH_DIRECTORY = "adblock";
+
/**
* Default (in some conditions) start redraw delay after DOM modified with injected JS (millis)
*/
@@ -954,10 +957,12 @@ public class AdblockWebView extends WebView
w("Creating AdblockEngine");
// assuming `this.debugMode` can be used as `developmentBuild` value
- adblockEngine = AdblockEngine.create(
- AdblockEngine.generateAppInfo(this.getContext(), debugMode),
- this.getContext().getCacheDir().getAbsolutePath(),
- true);
+ adblockEngine = AdblockEngine
+ .builder(
+ AdblockEngine.generateAppInfo(this.getContext(), debugMode),
+ this.getContext().getDir(BASE_PATH_DIRECTORY, Context.MODE_PRIVATE).getAbsolutePath())
+ .enableElementHiding(true)
+ .build();
}
private class ElemHideThread extends Thread

Powered by Google App Engine
This is Rietveld