Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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; | 18 package org.adblockplus.sbrowser.contentblocker; |
19 | 19 |
20 import java.util.Collections; | |
21 import java.util.HashMap; | |
22 import java.util.List; | |
23 import java.util.Locale; | |
24 | |
25 import org.adblockplus.sbrowser.contentblocker.engine.DefaultSubscriptionInfo; | |
26 import org.adblockplus.sbrowser.contentblocker.engine.Engine; | |
27 import org.adblockplus.sbrowser.contentblocker.engine.EngineService; | |
28 import org.adblockplus.sbrowser.contentblocker.engine.SubscriptionInfo; | |
29 import org.adblockplus.sbrowser.contentblocker.preferences.MultilinePreferenceCa tegory; | |
30 import org.adblockplus.adblockplussbrowser.R; | |
31 | |
20 import android.annotation.SuppressLint; | 32 import android.annotation.SuppressLint; |
21 import android.content.Context; | 33 import android.content.Context; |
22 import android.preference.CheckBoxPreference; | 34 import android.preference.CheckBoxPreference; |
23 import android.preference.Preference; | 35 import android.preference.Preference; |
24 import android.preference.Preference.OnPreferenceChangeListener; | 36 import android.preference.Preference.OnPreferenceChangeListener; |
25 import android.text.format.DateUtils; | 37 import android.text.format.DateUtils; |
26 import android.util.AttributeSet; | 38 import android.util.AttributeSet; |
27 import android.view.View; | 39 import android.view.View; |
28 import android.view.ViewGroup; | 40 import android.view.ViewGroup; |
29 | |
30 import org.adblockplus.adblockplussbrowser.R; | |
31 import org.adblockplus.sbrowser.contentblocker.engine.DefaultSubscriptionInfo; | |
32 import org.adblockplus.sbrowser.contentblocker.engine.Engine; | |
33 import org.adblockplus.sbrowser.contentblocker.engine.EngineService; | |
34 import org.adblockplus.sbrowser.contentblocker.engine.SubscriptionInfo; | |
35 import org.adblockplus.sbrowser.contentblocker.preferences.MultilinePreferenceCa tegory; | |
diegocarloslima
2017/05/25 18:53:56
These imports reordering aren't related to the iss
jens
2017/05/30 12:17:00
Acknowledged.
| |
36 | |
37 import java.util.Collections; | |
38 import java.util.HashMap; | |
39 import java.util.List; | |
40 import java.util.Locale; | |
41 | 41 |
42 @SuppressLint("DefaultLocale") | 42 @SuppressLint("DefaultLocale") |
43 public class ListedSubscriptionsPreferenceCategory extends MultilinePreferenceCa tegory implements | 43 public class ListedSubscriptionsPreferenceCategory extends MultilinePreferenceCa tegory implements |
44 EngineService.OnEngineCreatedCallback, OnPreferenceChangeListener | 44 EngineService.OnEngineCreatedCallback, OnPreferenceChangeListener |
45 { | 45 { |
46 private Engine engine = null; | 46 private Engine engine = null; |
47 private boolean isEnabledView = false; | 47 private boolean isEnabledView = false; |
48 | 48 |
49 private static final String[] LANGUAGE_TRANSLATIONS = | 49 private static final String[] LANGUAGE_TRANSLATIONS = |
50 { | 50 { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 public boolean onPreferenceChange(final Preference preference, final Object ne wValue) | 191 public boolean onPreferenceChange(final Preference preference, final Object ne wValue) |
192 { | 192 { |
193 final String id = preference.getKey(); | 193 final String id = preference.getKey(); |
194 final boolean enabled = ((Boolean) newValue).booleanValue(); | 194 final boolean enabled = ((Boolean) newValue).booleanValue(); |
195 | 195 |
196 this.engine.changeSubscriptionState(id, enabled); | 196 this.engine.changeSubscriptionState(id, enabled); |
197 | 197 |
198 return true; | 198 return true; |
199 } | 199 } |
200 } | 200 } |
LEFT | RIGHT |