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

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

Issue 5327480814567424: Issue 1108 - Support notifications (Closed)
Patch Set: More renaming. Created Feb. 18, 2015, 2:45 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 | « src/org/adblockplus/android/ABPEngine.java ('k') | src/org/adblockplus/android/CrashHandler.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/android/AdblockPlus.java
diff --git a/src/org/adblockplus/android/AdblockPlus.java b/src/org/adblockplus/android/AdblockPlus.java
index 8ca82bdf77783aab5f819d96010c5017134270d7..2b51644b9412c3307a7deb5c34cdd76fd1ac74a5 100755
--- a/src/org/adblockplus/android/AdblockPlus.java
+++ b/src/org/adblockplus/android/AdblockPlus.java
@@ -25,6 +25,7 @@ import java.util.List;
import java.util.regex.Pattern;
import org.adblockplus.libadblockplus.FilterEngine.ContentType;
+import org.adblockplus.libadblockplus.Notification;
import org.apache.commons.lang.StringUtils;
import android.app.ActivityManager;
@@ -47,6 +48,12 @@ import android.util.Log;
public class AdblockPlus extends Application
{
+ public static final int ONGOING_NOTIFICATION_ID = R.string.app_name;
+ public static final int UPDATE_NOTIFICATION_ID = R.string.app_name + 1;
+ // Insert new NOTIFICATION_IDs in between here
+ public static final int GROUPED_NOTIFICATION_ID = R.string.app_name + 32;
+ // Do not add NOTIFICATION_IDs here
+
private static final String TAG = Utils.getTag(AdblockPlus.class);
private static final Pattern RE_JS = Pattern.compile("\\.js$", Pattern.CASE_INSENSITIVE);
@@ -387,6 +394,23 @@ public class AdblockPlus extends Application
}
/**
+ * @return Notification to show for the given URL, {@code null} if none
+ * available
+ */
+ public Notification getNextNotificationToShow(String url)
+ {
+ return this.abpEngine.getNextNotificationToShow(url);
+ }
+
+ /**
+ * @return Notification to show, {@code null} if none available
+ */
+ public Notification getNextNotificationToShow()
+ {
+ return this.abpEngine.getNextNotificationToShow();
+ }
+
+ /**
* Initiates immediate interactive check for available update.
*/
public void checkUpdates()
« no previous file with comments | « src/org/adblockplus/android/ABPEngine.java ('k') | src/org/adblockplus/android/CrashHandler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld