OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 package org.adblockplus.sbrowser.contentblocker.util; | 18 package org.adblockplus.sbrowser.contentblocker.util; |
19 | 19 |
20 import java.util.List; | 20 import java.util.List; |
21 import java.util.Locale; | 21 import java.util.Locale; |
22 | 22 |
23 import org.adblockplus.adblockplussbrowser.BuildConfig; | 23 import org.adblockplus.adblockplussbrowser.BuildConfig; |
| 24 import org.adblockplus.sbrowser.contentblocker.engine.Notification; |
24 import org.adblockplus.sbrowser.contentblocker.engine.DefaultSubscriptionInfo; | 25 import org.adblockplus.sbrowser.contentblocker.engine.DefaultSubscriptionInfo; |
25 import org.adblockplus.sbrowser.contentblocker.engine.Engine; | 26 import org.adblockplus.sbrowser.contentblocker.engine.Engine; |
26 | 27 |
27 import android.content.res.Resources; | 28 import android.content.res.Resources; |
28 | 29 |
29 public class SubscriptionUtils | 30 public class SubscriptionUtils |
30 { | 31 { |
31 | 32 |
32 public static final String EASYLIST_URL = "https://easylist-downloads.adblockp
lus.org/easylist.txt"; | 33 public static final String EASYLIST_URL = "https://easylist-downloads.adblockp
lus.org/easylist.txt"; |
33 private static final String EASYLIST_CHINA_URL ="https://easylist-downloads.ad
blockplus.org/easylistchina+easylist.txt"; | 34 private static final String EASYLIST_CHINA_URL ="https://easylist-downloads.ad
blockplus.org/easylistchina+easylist.txt"; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 case HEBREW_OLD: | 90 case HEBREW_OLD: |
90 return HEBREW_NEW; | 91 return HEBREW_NEW; |
91 case YIDDISH_OLD: | 92 case YIDDISH_OLD: |
92 return YIDDISH_NEW; | 93 return YIDDISH_NEW; |
93 case INDONESIAN_OLD: | 94 case INDONESIAN_OLD: |
94 return INDONESIAN_NEW; | 95 return INDONESIAN_NEW; |
95 default: | 96 default: |
96 return language; | 97 return language; |
97 } | 98 } |
98 } | 99 } |
| 100 |
| 101 public static boolean isNotificationSubscription(final String id) |
| 102 { |
| 103 return id != null && id.contains(Notification.NOTIFICATION_URL); |
| 104 } |
99 } | 105 } |
OLD | NEW |