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) |