| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 abpEngine.setAcceptableAdsEnabled(enabled); | 284 abpEngine.setAcceptableAdsEnabled(enabled); |
| 285 } | 285 } |
| 286 | 286 |
| 287 public String getAcceptableAdsUrl() | 287 public String getAcceptableAdsUrl() |
| 288 { | 288 { |
| 289 final String documentationLink = abpEngine.getDocumentationLink(); | 289 final String documentationLink = abpEngine.getDocumentationLink(); |
| 290 final String locale = getResources().getConfiguration().locale.toString().re
place("_", "-"); | 290 final String locale = getResources().getConfiguration().locale.toString().re
place("_", "-"); |
| 291 return documentationLink.replace("%LINK%", "acceptable_ads").replace("%LANG%
", locale); | 291 return documentationLink.replace("%LINK%", "acceptable_ads").replace("%LANG%
", locale); |
| 292 } | 292 } |
| 293 | 293 |
| 294 public void setNotifiedAboutAcceptableAds(boolean notified) |
| 295 { |
| 296 abpEngine.setNotifiedAboutAcceptableAds(notified); |
| 297 } |
| 298 |
| 299 public boolean isNotifiedAboutAcceptableAds() |
| 300 { |
| 301 return abpEngine.isNotifiedAboutAcceptableAds(); |
| 302 } |
| 303 |
| 294 /** | 304 /** |
| 295 * Returns ElemHide selectors for domain. | 305 * Returns ElemHide selectors for domain. |
| 296 * | 306 * |
| 297 * @param domain The domain | 307 * @param domain The domain |
| 298 * @return A list of CSS selectors | 308 * @return A list of CSS selectors |
| 299 */ | 309 */ |
| 300 public String[] getSelectorsForDomain(final String domain) | 310 public String[] getSelectorsForDomain(final String domain) |
| 301 { | 311 { |
| 302 if (!filteringEnabled) | 312 if (!filteringEnabled) |
| 303 return null; | 313 return null; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 Log.e(TAG, e.getMessage(), e); | 489 Log.e(TAG, e.getMessage(), e); |
| 480 } | 490 } |
| 481 | 491 |
| 482 // Set crash handler | 492 // Set crash handler |
| 483 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); | 493 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); |
| 484 | 494 |
| 485 // Initiate update check | 495 // Initiate update check |
| 486 scheduleUpdater(0); | 496 scheduleUpdater(0); |
| 487 } | 497 } |
| 488 } | 498 } |
| OLD | NEW |