| LEFT | RIGHT |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 @Override | 51 @Override |
| 52 protected void onAttachedToActivity() | 52 protected void onAttachedToActivity() |
| 53 { | 53 { |
| 54 this.setPersistent(false); | 54 this.setPersistent(false); |
| 55 } | 55 } |
| 56 | 56 |
| 57 @Override | 57 @Override |
| 58 protected void onClick() | 58 protected void onClick() |
| 59 { | 59 { |
| 60 new UrlInputDialog(this.getContext(), UrlInputDialog.Type.ADD_BLOCKING_LIST,
this).show(); | 60 new UrlInputDialog(this.getContext(), UrlInputDialog.Type.ADD_SUBSCRIPTION,
this).show(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 @Override | 63 @Override |
| 64 public void callback(String url) | 64 public void callback(String url) |
| 65 { | 65 { |
| 66 try | 66 try |
| 67 { | 67 { |
| 68 if (redirectUrlReadyCallback != null) | 68 if (redirectUrlReadyCallback != null) |
| 69 { | 69 { |
| 70 final UrlInputDialog.UrlReadyCallback callback = redirectUrlReadyCallbac
k.get(); | 70 final UrlInputDialog.UrlReadyCallback callback = redirectUrlReadyCallbac
k.get(); |
| 71 if (callback != null) | 71 if (callback != null) |
| 72 { | 72 { |
| 73 callback.callback(url); | 73 callback.callback(url); |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 catch (Throwable t) | 77 catch (Throwable t) |
| 78 { | 78 { |
| 79 // we do not care | 79 // we do not care |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 } | 82 } |
| LEFT | RIGHT |