Index: libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java |
diff --git a/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java b/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java |
index 660346e5ef0032575b6892ec39c6f76871be9dc7..2358295665018e23066267f9cf4df844b9fa54be 100644 |
--- a/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java |
+++ b/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java |
@@ -19,6 +19,7 @@ package org.adblockplus.libadblockplus.android.settings; |
import android.content.Context; |
import android.content.SharedPreferences; |
+import android.net.ConnectivityManager; |
import android.util.Log; |
import org.adblockplus.libadblockplus.IsAllowedConnectionCallback; |
@@ -141,7 +142,9 @@ public class AdblockHelper |
private void createAdblock() |
{ |
- this.isAllowedConnectionCallback = new IsAllowedConnectionCallbackImpl(context); |
+ ConnectivityManager connectivityManager = |
+ (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); |
+ this.isAllowedConnectionCallback = new IsAllowedConnectionCallbackImpl(connectivityManager); |
Log.d(TAG, "Creating adblock engine ..."); |