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

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

Issue 29329928: Issue 3297 - Fix issues introduced by recent libadblockplus changes and update dependencies (Closed)
Patch Set: MinSDK and copy'n'paste Created Nov. 20, 2015, 12:19 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
« no previous file with comments | « jni/Utils.h ('k') | src/org/adblockplus/android/AdblockPlus.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
- }
}
« no previous file with comments | « jni/Utils.h ('k') | src/org/adblockplus/android/AdblockPlus.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld