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: Created March 31, 2016, 1:18 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
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();

Powered by Google App Engine
This is Rietveld