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..19c0803ba3ca3d908af8925b7bc1b8f2d3d975df 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.keypartner_whitelist); |
+ |
+ AdblockHelper |
+ .get() |
+ .init(this, true, AdblockHelper.PREFERENCE_NAME) |
+ .preloadSubscriptions(AdblockHelper.PRELOAD_PREFERENCE_NAME, map); |
} |
} |