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

Unified Diff: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Engine.java

Issue 29722618: Issue 6238 - Download/store notifications.json (Closed)
Patch Set: Created March 14, 2018, 1: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
Index: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Engine.java
===================================================================
--- a/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Engine.java
+++ b/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Engine.java
@@ -421,16 +421,23 @@ public final class Engine
final Subscription exceptions = engine.subscriptions.add(Subscription
.create(engine.getPrefsDefault(SUBSCRIPTIONS_EXCEPTIONSURL))
.parseLines(readLines(exceptionsTxt)));
exceptions.putMeta(Subscription.KEY_UPDATE_TIMESTAMP, "0");
exceptions.setEnabled(true);
}
Log.d(TAG, "Added and enabled bundled exceptionslist");
+ // The Notification should be download every 24 hrs., no matter if its content changed or not.
+ final Subscription notification = engine.subscriptions.add(Subscription
+ .create(Notification.NOTIFICATION_URL));
+ notification.putMeta(Subscription.KEY_UPDATE_TIMESTAMP, "0");
+ notification.setEnabled(true);
+ Log.d(TAG, "Initialized Notification");
+
int additional = 0;
for (final Subscription sub : engine.defaultSubscriptions.createSubscriptions())
{
if (!engine.subscriptions.hasSubscription(sub.getId()))
{
additional++;
engine.subscriptions.add(sub);
}

Powered by Google App Engine
This is Rietveld