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

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

Issue 29331923: Issue 3364 - Implement JNI bindings for IsDocument/ElemhideWhitelisted (Closed)
Patch Set: Issues No. 1 Created Dec. 4, 2015, 3: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
« no previous file with comments | « src/org/adblockplus/android/AdblockPlus.java ('k') | src/org/adblockplus/brazil/RequestHandler.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/android/AndroidWebRequest.java
diff --git a/src/org/adblockplus/android/AndroidWebRequest.java b/src/org/adblockplus/android/AndroidWebRequest.java
index ee52b368573dab336411d22c865afd3909f81356..215e5a18bde0354ec3c07c48e3770860465027e8 100644
--- a/src/org/adblockplus/android/AndroidWebRequest.java
+++ b/src/org/adblockplus/android/AndroidWebRequest.java
@@ -38,6 +38,17 @@ public class AndroidWebRequest extends WebRequest
public final static String TAG = Utils.getTag(WebRequest.class);
private final HashSet<String> subscriptionURLs = new HashSet<String>();
+ private final boolean elemhideEnabled;
+
+ AndroidWebRequest(boolean enableElemhide)
+ {
+ this.elemhideEnabled = enableElemhide;
+ }
+
+ AndroidWebRequest()
+ {
+ this(false);
+ }
private boolean isListedSubscriptionUrl(final URL url)
{
@@ -81,7 +92,7 @@ public class AndroidWebRequest extends WebRequest
final BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8"));
final StringBuilder sb = new StringBuilder();
- if (isListedSubscriptionUrl(url))
+ if (!this.elemhideEnabled && isListedSubscriptionUrl(url))
{
Log.d(TAG, "Removing element hiding rules from: '" + url + "'");
« no previous file with comments | « src/org/adblockplus/android/AdblockPlus.java ('k') | src/org/adblockplus/brazil/RequestHandler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld