| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 private void initFilterLists() | 170 private void initFilterLists() |
| 171 { | 171 { |
| 172 // all available values | 172 // all available values |
| 173 Subscription[] availableSubscriptions = provider.getAdblockEngine().getRecom
mendedSubscriptions(); | 173 Subscription[] availableSubscriptions = provider.getAdblockEngine().getRecom
mendedSubscriptions(); |
| 174 CharSequence[] availableSubscriptionsTitles = new CharSequence[availableSubs
criptions.length]; | 174 CharSequence[] availableSubscriptionsTitles = new CharSequence[availableSubs
criptions.length]; |
| 175 CharSequence[] availableSubscriptionsValues = new CharSequence[availableSubs
criptions.length]; | 175 CharSequence[] availableSubscriptionsValues = new CharSequence[availableSubs
criptions.length]; |
| 176 for (int i = 0; i < availableSubscriptions.length; i++) | 176 for (int i = 0; i < availableSubscriptions.length; i++) |
| 177 { | 177 { |
| 178 availableSubscriptionsTitles[i] = availableSubscriptions[i].title; | 178 availableSubscriptionsTitles[i] = availableSubscriptions[i].specialization
; |
| 179 availableSubscriptionsValues[i] = availableSubscriptions[i].url; | 179 availableSubscriptionsValues[i] = availableSubscriptions[i].url; |
| 180 } | 180 } |
| 181 filterLists.setEntries(availableSubscriptionsTitles); | 181 filterLists.setEntries(availableSubscriptionsTitles); |
| 182 filterLists.setEntryValues(availableSubscriptionsValues); | 182 filterLists.setEntryValues(availableSubscriptionsValues); |
| 183 | 183 |
| 184 // selected values | 184 // selected values |
| 185 Set<String> selectedSubscriptionValues = new HashSet<String>(); | 185 Set<String> selectedSubscriptionValues = new HashSet<String>(); |
| 186 for (Subscription eachSubscription : settings.getSubscriptions()) | 186 for (Subscription eachSubscription : settings.getSubscriptions()) |
| 187 { | 187 { |
| 188 selectedSubscriptionValues.add(eachSubscription.url); | 188 selectedSubscriptionValues.add(eachSubscription.url); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } | 320 } |
| 321 else | 321 else |
| 322 { | 322 { |
| 323 // should not be invoked as only 'wl' preference is subscribed for callbac
k | 323 // should not be invoked as only 'wl' preference is subscribed for callbac
k |
| 324 return false; | 324 return false; |
| 325 } | 325 } |
| 326 | 326 |
| 327 return true; | 327 return true; |
| 328 } | 328 } |
| 329 } | 329 } |
| OLD | NEW |