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

Unified Diff: src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java

Issue 29339199: Issue 3846 - Add notification for users using an old SBrowser version (Closed)
Patch Set: Removed version bump Created April 10, 2016, 10:04 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/sbrowser/contentblocker/MainPreferences.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java
diff --git a/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java b/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java
index 71024f4ddeb1386f2fe926cac7d86eb024ebbc21..b14630415139094ccbc11c32b0a5fb44eee1b5d7 100644
--- a/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java
+++ b/src/org/adblockplus/sbrowser/contentblocker/engine/Engine.java
@@ -136,6 +136,19 @@ public final class Engine
return list.size() > 0;
}
+ public static boolean hasCompatibleSBrowserInstalled(final Context activityContext)
+ {
+ try
+ {
+ return activityContext.getPackageManager()
+ .queryIntentActivities(new Intent(ACTION_OPEN_SETTINGS), 0).size() > 0;
+ }
+ catch (final Throwable t)
+ {
+ return false;
+ }
+ }
+
void requestUpdateBroadcast()
{
this.lock();
« no previous file with comments | « src/org/adblockplus/sbrowser/contentblocker/MainPreferences.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld