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-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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 callback.onApiRequestFailed(error); | 342 callback.onApiRequestFailed(error); |
343 } | 343 } |
344 }); | 344 }); |
345 } | 345 } |
346 | 346 |
347 private static class AddOnEventListener implements BundleEventListener | 347 private static class AddOnEventListener implements BundleEventListener |
348 { | 348 { |
349 @Override | 349 @Override |
350 public void handleMessage(String event, GeckoBundle message, EventCallback c
allback) | 350 public void handleMessage(String event, GeckoBundle message, EventCallback c
allback) |
351 { | 351 { |
352 Log.d(TAG, "AddOnEventListener handleMessage evt: " + event + " msg: " + m
essage.toString()); | |
353 if (ON_FILTERS_LOAD_EVENT.equals(event)) | 352 if (ON_FILTERS_LOAD_EVENT.equals(event)) |
354 { | 353 { |
355 // The filters have been loaded by the extension. Given that, we can sen
d all pending requests | 354 // The filters have been loaded by the extension. Given that, we can sen
d all pending requests |
356 filtersLoaded = true; | 355 filtersLoaded = true; |
357 sendPendingRequests(); | 356 sendPendingRequests(); |
358 } | 357 } |
359 else if (ON_FILTERS_SAVE_EVENT.equals(event)) | 358 else if (ON_FILTERS_SAVE_EVENT.equals(event)) |
360 { | 359 { |
361 // All changes have been saved by the extension. That way, we can clear
our list of | 360 // All changes have been saved by the extension. That way, we can clear
our list of |
362 // pending requests | 361 // pending requests |
363 // See https://issues.adblockplus.org/ticket/2853 | 362 // See https://issues.adblockplus.org/ticket/2853 |
364 clearPendingRequests(); | 363 clearPendingRequests(); |
365 } | 364 } |
366 } | 365 } |
367 } | 366 } |
368 } | 367 } |
LEFT | RIGHT |