| Index: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java |
| =================================================================== |
| --- a/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java |
| +++ b/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java |
| @@ -113,17 +113,17 @@ final class Subscriptions |
| if (sub != null) |
| { |
| if (enabled != sub.isEnabled()) |
| { |
| sub.setEnabled(enabled); |
| sub.serializeMetaData(this.getMetaFile(sub)); |
| if (enabled) |
| { |
| - this.engine.enqueueDownload(sub, true); |
| + this.engine.enqueueDownload(sub, true, false); |
| } |
| this.engine.subscriptionStateChanged(); |
| this.engine.requestUpdateBroadcast(); |
| return true; |
| } |
| } |
| return false; |
| @@ -178,17 +178,17 @@ final class Subscriptions |
| { |
| Log.d(TAG, "Adding filters for '" + s.getId() + "'"); |
| s.deserializeFilters(this.getFiltersFile(s)); |
| s.copyFilters(filters); |
| s.clearFilters(); |
| } |
| if ((!s.isMetaDataValid() || !s.isFiltersValid()) && s.getURL() != null) |
| { |
| - this.engine.enqueueDownload(s, true); |
| + this.engine.enqueueDownload(s, true, false); |
| } |
| } |
| try (final BufferedWriter w = new BufferedWriter( |
| new OutputStreamWriter(new FileOutputStream(output), StandardCharsets.UTF_8))) |
| { |
| Log.d(TAG, "Writing " + filters.size() + " filters"); |
| Engine.writeFilterHeaders(w); |
| @@ -265,23 +265,23 @@ final class Subscriptions |
| final Subscription userSub = Subscription.createUserSubscription(title); |
| if (!this.subscriptions.containsKey(userSub.getId())) |
| { |
| this.subscriptions.put(userSub.getId(), userSub); |
| } |
| } |
| } |
| - public void checkForUpdates() throws IOException |
| + public void checkForUpdates(final boolean forced, final boolean allowMetered) throws IOException |
| { |
| for (Subscription sub : this.subscriptions.values()) |
| { |
| if (sub.isEnabled()) |
| { |
| - this.engine.enqueueDownload(sub, false); |
| + this.engine.enqueueDownload(sub, forced, allowMetered); |
| } |
| } |
| } |
| public void updateSubscription(final String id, final int responseCode, final String text, |
| final Map<String, String> httpHeaders) |
| throws IOException |
| { |