cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [05/10] android commit: Filter out non-launchable intents
Date Thu, 14 Aug 2014 21:21:13 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/d6eb723b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/d6eb723b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/d6eb723b

Branch: refs/heads/4.0.x
Commit: d6eb723b7fdefc1dd2c3d8b0cdae24783ac8968f
Parents: 993d737
Author: Ian Clelland <iclelland@chromium.org>
Authored: Tue Jul 22 13:53:33 2014 -0400
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Wed Aug 6 09:55:03 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/d6eb723b/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 f189f1c..dcbaeb5 100644
--- a/framework/src/org/apache/cordova/CordovaUriHelper.java
+++ b/framework/src/org/apache/cordova/CordovaUriHelper.java
@@ -69,6 +69,9 @@ 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