| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 JsValue jsUrl = jsSubscription.getProperty("url"); | 352 JsValue jsUrl = jsSubscription.getProperty("url"); |
| 353 try | 353 try |
| 354 { | 354 { |
| 355 subscription.url = jsUrl.toString(); | 355 subscription.url = jsUrl.toString(); |
| 356 } | 356 } |
| 357 finally | 357 finally |
| 358 { | 358 { |
| 359 jsUrl.dispose(); | 359 jsUrl.dispose(); |
| 360 } | 360 } |
| 361 | 361 |
| 362 JsValue jsSpecialization = jsSubscription.getProperty("specialization"); |
| 363 try |
| 364 { |
| 365 subscription.specialization = jsSpecialization.toString(); |
| 366 } |
| 367 finally |
| 368 { |
| 369 jsSpecialization.dispose(); |
| 370 } |
| 371 |
| 362 return subscription; | 372 return subscription; |
| 363 } | 373 } |
| 364 | 374 |
| 365 private static org.adblockplus.libadblockplus.android.Subscription[] convertJs
Subscriptions( | 375 private static org.adblockplus.libadblockplus.android.Subscription[] convertJs
Subscriptions( |
| 366 final List<Subscription> jsSubscriptions) | 376 final List<Subscription> jsSubscriptions) |
| 367 { | 377 { |
| 368 final org.adblockplus.libadblockplus.android.Subscription[] subscriptions = | 378 final org.adblockplus.libadblockplus.android.Subscription[] subscriptions = |
| 369 new org.adblockplus.libadblockplus.android.Subscription[jsSubscriptions.si
ze()]; | 379 new org.adblockplus.libadblockplus.android.Subscription[jsSubscriptions.si
ze()]; |
| 370 | 380 |
| 371 for (int i = 0; i < subscriptions.length; i++) | 381 for (int i = 0; i < subscriptions.length; i++) |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 public void setWhitelistedDomains(List<String> domains) | 632 public void setWhitelistedDomains(List<String> domains) |
| 623 { | 633 { |
| 624 this.whitelistedDomains = domains; | 634 this.whitelistedDomains = domains; |
| 625 } | 635 } |
| 626 | 636 |
| 627 public List<String> getWhitelistedDomains() | 637 public List<String> getWhitelistedDomains() |
| 628 { | 638 { |
| 629 return whitelistedDomains; | 639 return whitelistedDomains; |
| 630 } | 640 } |
| 631 } | 641 } |
| OLD | NEW |