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

Unified Diff: src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java

Issue 29376835: Issue 4769 - Supporting adding whitelisted websites on ABP for Samsung Internet (Closed)
Patch Set: Adjusting Russian string Created March 15, 2017, 4:56 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/sbrowser/contentblocker/engine/Subscription.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java
===================================================================
--- a/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java
+++ b/src/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java
@@ -36,19 +36,16 @@ import android.util.Log;
* This class holds all listed subscriptions and manages the subscription
* aggregation cache folder.
*/
final class Subscriptions
{
private static final String TAG = Subscriptions.class.getSimpleName();
private static final String[] USER_SUBSCRIPTIONS =
{ Engine.USER_FILTERS_TITLE, Engine.USER_EXCEPTIONS_TITLE };
- // Filters that begin with '|$' , '||$' , '@@|$' or '@@||$'
- // See https://issues.adblockplus.org/ticket/4772
- private static final String UNSUPPORTED_FILTERS_REGEX = "^(\\|\\$|\\|\\|\\$|@@\\|\\$|@@\\|\\|\\$).*";
private final HashMap<String, Subscription> subscriptions = new HashMap<String, Subscription>();
private final Engine engine;
private final File subscriptionFolder;
private final File cacheFolder;
private final boolean wasUnitialized;
private Subscriptions(final Engine engine, final File appFolder, final File cacheFolder)
@@ -177,34 +174,25 @@ final class Subscriptions
s.clearFilters();
s.deserializeFilters(this.getFiltersFile(s));
s.getFilters(filters);
s.clearFilters();
}
}
final BufferedWriter w = new BufferedWriter(
- new OutputStreamWriter(new FileOutputStream(output), "UTF-8"));
+ new OutputStreamWriter(new FileOutputStream(output), Engine.CHARSET_UTF_8));
try
{
Log.d(TAG, "Writing " + filters.size() + " filters");
Engine.writeFilterHeaders(w);
for (final String filter : filters)
{
- // This is a temporary fix to not write filters that might crash Samsung Internet
- // See https://issues.adblockplus.org/ticket/4772
- if (!filter.matches(UNSUPPORTED_FILTERS_REGEX))
- {
- w.write(filter);
- w.write('\n');
- }
- else
- {
- Log.d(TAG, "Ignoring unsupported filter: " + filter);
- }
+ w.write(filter);
+ w.write('\n');
}
}
finally
{
w.close();
}
}
« no previous file with comments | « src/org/adblockplus/sbrowser/contentblocker/engine/Subscription.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld