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

Unified Diff: src/org/adblockplus/android/AdblockPlus.java

Issue 4705284891082752: Proxy configurators (Closed)
Patch Set: Another round Created Aug. 19, 2014, 4:34 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
« no previous file with comments | « no previous file | src/org/adblockplus/android/AdvancedPreferences.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/android/AdblockPlus.java
diff --git a/src/org/adblockplus/android/AdblockPlus.java b/src/org/adblockplus/android/AdblockPlus.java
index 3feb00dd56b1b2038ee42fefedb8103a8cf40e70..a86d2182290f3a6c82fc8e3b59ca0ac4bc54832d 100755
--- a/src/org/adblockplus/android/AdblockPlus.java
+++ b/src/org/adblockplus/android/AdblockPlus.java
@@ -23,11 +23,8 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.util.ArrayList;
import java.util.Calendar;
-import java.util.LinkedHashMap;
import java.util.List;
-import java.util.Map;
import java.util.TimeZone;
import java.util.regex.Pattern;
@@ -77,10 +74,6 @@ public class AdblockPlus extends Application
*/
public static final String BROADCAST_SUBSCRIPTION_STATUS = "org.adblockplus.android.subscription.status";
/**
- * Broadcasted when filter match check is performed.
- */
- public static final String BROADCAST_FILTER_MATCHES = "org.adblockplus.android.filter.matches";
- /**
* Cached list of recommended subscriptions.
*/
private Subscription[] subscriptions;
@@ -228,7 +221,6 @@ public class AdblockPlus extends Application
*/
public Subscription[] getRecommendedSubscriptions()
{
- // TODO: Why don't we re-check?
if (subscriptions == null)
subscriptions = abpEngine.getRecommendedSubscriptions();
return subscriptions;
@@ -340,7 +332,7 @@ public class AdblockPlus extends Application
*/
public boolean matches(final String url, final String query, final String referrer, final String accept)
{
- final String fullUrl = !"".equals(query) ? url + "?" + query : url;
+ final String fullUrl = StringUtils.isNotEmpty(query) ? url + "?" + query : url;
if (referrer != null)
referrerMapping.add(fullUrl, referrer);
@@ -376,7 +368,6 @@ public class AdblockPlus extends Application
contentType = "OTHER";
final List<String> referrerChain = referrerMapping.buildReferrerChain(referrer);
- Log.d("Referrer chain", fullUrl + ": " + referrerChain.toString());
final String[] referrerChainArray = referrerChain.toArray(new String[referrerChain.size()]);
return abpEngine.matches(fullUrl, contentType, referrerChainArray);
}
« no previous file with comments | « no previous file | src/org/adblockplus/android/AdvancedPreferences.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld