Index: libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java |
diff --git a/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java b/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java |
index 3d6e4afa88c4a72199f2e8bb15542c9924749b68..262598befb5475f9e9ec21a679c0c1fa268b8864 100644 |
--- a/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java |
+++ b/libadblockplus-android-webviewapp/src/org/adblockplus/libadblockplus/android/webviewapp/Application.java |
@@ -17,8 +17,12 @@ |
package org.adblockplus.libadblockplus.android.webviewapp; |
+import org.adblockplus.libadblockplus.android.AndroidWebRequestResourceWrapper; |
import org.adblockplus.libadblockplus.android.settings.AdblockHelper; |
+import java.util.HashMap; |
+import java.util.Map; |
+ |
public class Application extends android.app.Application |
{ |
@Override |
@@ -27,6 +31,16 @@ public class Application extends android.app.Application |
super.onCreate(); |
// init Adblock |
- AdblockHelper.get().init(this, true, AdblockHelper.PREFERENCE_NAME); |
+ |
+ // provide preloaded subscriptions |
+ Map<String, Integer> map = new HashMap<String, Integer>(); |
+ map.put(AndroidWebRequestResourceWrapper.EASYLIST, R.raw.easylist_min); |
+ map.put(AndroidWebRequestResourceWrapper.EASYLIST_CHINESE, R.raw.easylist_min); |
+ map.put(AndroidWebRequestResourceWrapper.ACCEPTABLE_ADS, R.raw.exceptionrules_minimal); |
+ |
+ AdblockHelper |
+ .get() |
+ .init(this, true, AdblockHelper.PREFERENCE_NAME) |
+ .preloadSubscriptions(AdblockHelper.PRELOAD_PREFERENCE_NAME, map); |
} |
} |