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

Unified Diff: libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java

Issue 29413555: Issue 5145 - Add test for IsAllowedConnectionCallbackImpl (Closed)
Patch Set: Created April 15, 2017, 1:55 p.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-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 ...");

Powered by Google App Engine
This is Rietveld