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: Created April 20, 2018, 1:27 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";
anton 2018/04/20 14:03:20 why can't it be public?
diegocarloslima 2018/04/20 14:48:52 It actually can, but since it was't being used any
anton 2018/04/20 14:50:28 ok, i'm not strong about it. Just wanted to make s
+
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))
anton 2018/04/20 14:03:20 isn't space require here?
diegocarloslima 2018/04/20 14:48:52 Acknowledged.
+ {
+ 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