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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 { | 385 { |
386 if (abpEngine != null) | 386 if (abpEngine != null) |
387 { | 387 { |
388 abpEngine.dispose(); | 388 abpEngine.dispose(); |
389 abpEngine = null; | 389 abpEngine = null; |
390 Log.i(TAG, "stopEngine"); | 390 Log.i(TAG, "stopEngine"); |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
394 /** | 394 /** |
395 * @return Notification to show for the given URL, {@code null} if none | |
396 * available | |
397 */ | |
398 public Notification getNextNotificationToShow(String url) | |
399 { | |
400 return this.abpEngine.getNextNotificationToShow(url); | |
401 } | |
402 | |
403 /** | |
404 * @return Notification to show, {@code null} if none available | |
405 */ | |
406 public Notification getNextNotificationToShow() | |
407 { | |
408 return this.abpEngine.getNextNotificationToShow(); | |
409 } | |
410 | |
411 /** | |
412 * Initiates immediate interactive check for available update. | 395 * Initiates immediate interactive check for available update. |
413 */ | 396 */ |
414 public void checkUpdates() | 397 public void checkUpdates() |
415 { | 398 { |
416 abpEngine.checkForUpdates(); | 399 abpEngine.checkForUpdates(); |
417 } | 400 } |
418 | 401 |
419 @Override | 402 @Override |
420 public void onCreate() | 403 public void onCreate() |
421 { | 404 { |
(...skipping 29 matching lines...) Expand all Loading... |
451 } | 434 } |
452 catch (final IOException e) | 435 catch (final IOException e) |
453 { | 436 { |
454 Log.e(TAG, e.getMessage(), e); | 437 Log.e(TAG, e.getMessage(), e); |
455 } | 438 } |
456 | 439 |
457 // Set crash handler | 440 // Set crash handler |
458 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); | 441 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); |
459 } | 442 } |
460 } | 443 } |
OLD | NEW |