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") |