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 29757571: Issue 6591 - Bundle ABP for Samsung Internet China with Easylist for China (Closed)
Patch Set: Adjustments regarding Anton's comments Created April 20, 2018, 3:13 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/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
@@ -20,6 +20,7 @@
import java.util.List;
import java.util.Locale;
+import org.adblockplus.adblockplussbrowser.BuildConfig;
import org.adblockplus.sbrowser.contentblocker.engine.DefaultSubscriptionInfo;
import org.adblockplus.sbrowser.contentblocker.engine.Engine;
@@ -28,6 +29,9 @@
public class SubscriptionUtils
{
+ public static final String EASYLIST_URL = "https://easylist-downloads.adblockplus.org/easylist.txt";
+ private static final String EASYLIST_CHINA_URL ="https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt";
+
private static final String INDONESIAN_OLD = "in";
private static final String INDONESIAN_NEW = "id";
private static final String HEBREW_OLD = "iw";
@@ -42,6 +46,10 @@
*/
public static String chooseDefaultSubscriptionUrl(List<DefaultSubscriptionInfo> defaultSubscriptions)
{
+ if (BuildConfig.FLAVOR.equals(BuildConfig.FLAVOR_REGION_CHINA))
+ {
+ return EASYLIST_CHINA_URL;
+ }
for (final DefaultSubscriptionInfo info : defaultSubscriptions)
{
if (info != null && info.getPrefixes().contains(getDeviceLanguageCode()) && info.isComplete())
@@ -49,7 +57,7 @@
return info.getUrl();
}
}
- return Engine.EASYLIST_URL;
+ return EASYLIST_URL;
}
@SuppressWarnings("deprecation")

Powered by Google App Engine
This is Rietveld