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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 else | 143 else |
144 { | 144 { |
145 iterator.remove(); | 145 iterator.remove(); |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 if (shouldAddListener) | 149 if (shouldAddListener) |
150 { | 150 { |
151 this.subscriptionListeners.add(new WeakReference<>(listener)); | 151 this.subscriptionListeners.add(new WeakReference<>(listener)); |
152 } | 152 } |
153 } | |
154 | |
155 public void removeSubscriptionListener(SubscriptionListener listener) | |
156 { | |
157 this.subscriptionListeners.remove(listener); | |
158 } | 153 } |
159 | 154 |
160 @Override | 155 @Override |
161 public void onApiRequestSucceeded(NativeJSObject jsObject) | 156 public void onApiRequestSucceeded(NativeJSObject jsObject) |
162 { | 157 { |
163 final XmlPullParser parser = Xml.newPullParser(); | 158 final XmlPullParser parser = Xml.newPullParser(); |
164 try | 159 try |
165 { | 160 { |
166 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); | 161 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); |
167 parser.setInput(new StringReader(AddOnBridge.getStringFromJsObject(jsObjec
t, "value", ""))); | 162 parser.setInput(new StringReader(AddOnBridge.getStringFromJsObject(jsObjec
t, "value", ""))); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 { | 332 { |
338 return this.specialization + " (" + this.title + ") @ " + this.url; | 333 return this.specialization + " (" + this.title + ") @ " + this.url; |
339 } | 334 } |
340 } | 335 } |
341 | 336 |
342 public interface SubscriptionListener | 337 public interface SubscriptionListener |
343 { | 338 { |
344 void onSubscriptionUpdated(); | 339 void onSubscriptionUpdated(); |
345 } | 340 } |
346 } | 341 } |
LEFT | RIGHT |