cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [4/6] android commit: Filter out non-launchable intents
Date Mon, 04 Aug 2014 17:45:33 GMT
Filter out non-launchable intents


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/07f81000
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/07f81000
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/07f81000

Branch: refs/heads/3.5.x
Commit: 07f8100058254b626edbc8efdac8026bdf876ee4
Parents: 25b8d36
Author: Ian Clelland <iclelland@chromium.org>
Authored: Tue Jul 22 13:53:33 2014 -0400
Committer: Marcel Kinard <cmarcelk@gmail.com>
Committed: Mon Jul 28 16:30:55 2014 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaUriHelper.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/07f81000/framework/src/org/apache/cordova/CordovaUriHelper.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaUriHelper.java b/framework/src/org/apache/cordova/CordovaUriHelper.java
index 1a113de..5cd8ce2 100644
--- a/framework/src/org/apache/cordova/CordovaUriHelper.java
+++ b/framework/src/org/apache/cordova/CordovaUriHelper.java
@@ -98,6 +98,9 @@ public class CordovaUriHelper {
             try {
                 Intent intent = new Intent(Intent.ACTION_VIEW);
                 intent.setData(Uri.parse(url));
+                intent.addCategory(Intent.CATEGORY_BROWSABLE);
+                intent.setComponent(null);
+                intent.setSelector(null);
                 this.cordova.getActivity().startActivity(intent);
             } catch (android.content.ActivityNotFoundException e) {
                 LOG.e(TAG, "Error loading url " + url, e);


Mime
View raw message