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

Unified Diff: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/util/SubscriptionUtils.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
« no previous file with comments | « adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/util/SubscriptionUtils.java
===================================================================
--- a/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/util/SubscriptionUtils.java
+++ b/adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/util/SubscriptionUtils.java
@@ -17,16 +17,17 @@
package org.adblockplus.sbrowser.contentblocker.util;
import java.util.List;
import java.util.Locale;
import org.adblockplus.sbrowser.contentblocker.engine.DefaultSubscriptionInfo;
import org.adblockplus.sbrowser.contentblocker.engine.Engine;
+import org.adblockplus.sbrowser.contentblocker.engine.Notification;
import android.content.res.Resources;
public class SubscriptionUtils
{
private static final String INDONESIAN_OLD = "in";
private static final String INDONESIAN_NEW = "id";
@@ -83,9 +84,14 @@ public class SubscriptionUtils
case YIDDISH_OLD:
return YIDDISH_NEW;
case INDONESIAN_OLD:
return INDONESIAN_NEW;
default:
return language;
}
}
+
+ public static boolean isNotificationSubscription(final String id)
+ {
+ return id != null && id.contains(Notification.NOTIFICATION_URL);
+ }
}
« no previous file with comments | « adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Subscriptions.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld