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 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 private class CheckBoxChangeListener implements OnPreferenceChangeListener | 181 private class CheckBoxChangeListener implements OnPreferenceChangeListener |
182 { | 182 { |
183 @Override | 183 @Override |
184 public boolean onPreferenceChange(Preference preference, Object newValue) | 184 public boolean onPreferenceChange(Preference preference, Object newValue) |
185 { | 185 { |
186 if (preference instanceof CheckBoxPreference && newValue instanceof Boolea
n) | 186 if (preference instanceof CheckBoxPreference && newValue instanceof Boolea
n) |
187 { | 187 { |
188 showProgressDialog(); | 188 showProgressDialog(); |
189 | 189 |
190 final CheckBoxPreference cbp = (CheckBoxPreference) preference; | 190 final CheckBoxPreference cbp = (CheckBoxPreference) preference; |
191 final boolean enable = ((Boolean) newValue).booleanValue(); | 191 final boolean enable = (Boolean) newValue; |
192 SubscriptionPreferenceCategory.subscriptionContainer.changeSubscriptionS
tate( | 192 SubscriptionPreferenceCategory.subscriptionContainer.changeSubscriptionS
tate( |
193 cbp.getKey(), | 193 cbp.getKey(), |
194 enable); | 194 enable); |
195 } | 195 } |
196 return true; | 196 return true; |
197 } | 197 } |
198 } | 198 } |
199 | 199 |
200 private class SubscriptionChangeListener implements SubscriptionContainer.Subs
criptionListener | 200 private class SubscriptionChangeListener implements SubscriptionContainer.Subs
criptionListener |
201 { | 201 { |
202 @Override | 202 @Override |
203 public void onSubscriptionUpdated() | 203 public void onSubscriptionUpdated() |
204 { | 204 { |
205 SubscriptionPreferenceCategory.this.refreshEntries(); | 205 SubscriptionPreferenceCategory.this.refreshEntries(); |
206 } | 206 } |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
OLD | NEW |