Index: src/org/adblockplus/android/ABPEngine.java |
diff --git a/src/org/adblockplus/android/ABPEngine.java b/src/org/adblockplus/android/ABPEngine.java |
index 0eb5a41dd983ca542063dc070e50f22dd336526e..418185e0f0fcde90f0fde593af69e92c206fec8e 100644 |
--- a/src/org/adblockplus/android/ABPEngine.java |
+++ b/src/org/adblockplus/android/ABPEngine.java |
@@ -27,7 +27,7 @@ import org.adblockplus.libadblockplus.FilterEngine; |
import org.adblockplus.libadblockplus.FilterEngine.ContentType; |
import org.adblockplus.libadblockplus.JsEngine; |
import org.adblockplus.libadblockplus.LogSystem; |
-import org.adblockplus.libadblockplus.Notification; |
+import org.adblockplus.libadblockplus.ShowNotificationCallback; |
import org.adblockplus.libadblockplus.Subscription; |
import org.adblockplus.libadblockplus.UpdateAvailableCallback; |
import org.adblockplus.libadblockplus.UpdateCheckDoneCallback; |
@@ -62,6 +62,7 @@ public final class ABPEngine |
private volatile UpdateAvailableCallback updateAvailableCallback; |
private volatile UpdateCheckDoneCallback updateCheckDoneCallback; |
private volatile FilterChangeCallback filterChangeCallback; |
+ private volatile ShowNotificationCallback showNotificationCallback; |
private ABPEngine(final Context context) |
{ |
@@ -118,6 +119,9 @@ public final class ABPEngine |
engine.updateCheckDoneCallback = new AndroidUpdateCheckDoneCallback(context); |
+ engine.showNotificationCallback = new AndroidShowNotificationCallback(context); |
+ engine.filterEngine.setShowNotificationCallback(engine.showNotificationCallback); |
+ |
return engine; |
} |
@@ -165,6 +169,12 @@ public final class ABPEngine |
this.filterChangeCallback.dispose(); |
this.filterChangeCallback = null; |
} |
+ |
+ if (this.showNotificationCallback != null) |
+ { |
+ this.showNotificationCallback.dispose(); |
+ this.showNotificationCallback = null; |
+ } |
} |
public boolean isFirstRun() |
@@ -281,14 +291,4 @@ public final class ABPEngine |
Utils.updateSubscriptionStatus(this.context, sub); |
} |
} |
- |
- public Notification getNextNotificationToShow(String url) |
- { |
- return this.filterEngine.getNextNotificationToShow(url); |
- } |
- |
- public Notification getNextNotificationToShow() |
- { |
- return this.filterEngine.getNextNotificationToShow(); |
- } |
} |