Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/android/ABPEngine.java

Issue 5153282527854592: Issue 98 - Use the libadblockplus update mechanism (Closed)
Patch Set: Created Sept. 25, 2014, 3:57 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/org/adblockplus/android/ABPEngine.java
===================================================================
--- a/src/org/adblockplus/android/ABPEngine.java
+++ b/src/org/adblockplus/android/ABPEngine.java
@@ -21,7 +21,6 @@
import java.util.Locale;
import org.adblockplus.libadblockplus.AppInfo;
-import org.adblockplus.libadblockplus.EventCallback;
import org.adblockplus.libadblockplus.Filter;
import org.adblockplus.libadblockplus.FilterChangeCallback;
import org.adblockplus.libadblockplus.FilterEngine;
@@ -29,6 +28,7 @@
import org.adblockplus.libadblockplus.JsEngine;
import org.adblockplus.libadblockplus.LogSystem;
import org.adblockplus.libadblockplus.Subscription;
+import org.adblockplus.libadblockplus.UpdateAvailableCallback;
import org.adblockplus.libadblockplus.UpdateCheckDoneCallback;
import org.adblockplus.libadblockplus.WebRequest;
@@ -59,7 +59,7 @@
private volatile FilterEngine filterEngine;
private volatile LogSystem logSystem;
private volatile WebRequest webRequest;
- private volatile EventCallback updateCallback;
+ private volatile UpdateAvailableCallback updateAvailableCallback;
private volatile UpdateCheckDoneCallback updateCheckDoneCallback;
private volatile FilterChangeCallback filterChangeCallback;
@@ -105,10 +105,9 @@
engine.webRequest = new AndroidWebRequest();
engine.jsEngine.setWebRequest(engine.webRequest);
- engine.updateCallback = new AndroidUpdateAvailableCallback(context);
- engine.jsEngine.setEventCallback("updateAvailable", engine.updateCallback);
-
engine.filterEngine = new FilterEngine(engine.jsEngine);
+ engine.updateAvailableCallback = new AndroidUpdateAvailableCallback(context);
+ engine.filterEngine.setUpdateAvailableCallback(engine.updateAvailableCallback);
engine.filterChangeCallback = new AndroidFilterChangeCallback(context);
engine.filterEngine.setFilterChangeCallback(engine.filterChangeCallback);
@@ -144,10 +143,10 @@
this.webRequest = null;
}
- if (this.updateCallback != null)
+ if (this.updateAvailableCallback != null)
{
- this.updateCallback.dispose();
- this.updateCallback = null;
+ this.updateAvailableCallback.dispose();
+ this.updateAvailableCallback = null;
}
if (this.updateCheckDoneCallback != null)

Powered by Google App Engine
This is Rietveld