Bug 1175532 - Use Intent.parseUri for intent:// & android-app://. r=margaret
authorMichael Comella <michael.l.comella@gmail.com>
Fri, 10 Jul 2015 16:40:00 -0700
changeset 287162 11ebe4ba54b5b74a3d05f264fc6095051089c702
parent 287161 819c7da861a2dbb1c221a5510e8424194d5c77df
child 287163 3b696b49a755c6cb17f20fbbf5fc68c6302813c1
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1175532, 1182328
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1175532 - Use Intent.parseUri for intent:// & android-app://. r=margaret We now specify no flags to Intent.parseUri so it can accept and parse arbitrary URIs. This patch is originally from bug 1182328 and r+'d there.
mobile/android/base/GeckoAppShell.java
--- a/mobile/android/base/GeckoAppShell.java
+++ b/mobile/android/base/GeckoAppShell.java
@@ -1240,20 +1240,20 @@ public class GeckoAppShell
             return intent;
         }
 
         if (!isUriSafeForScheme(uri)) {
             return null;
         }
 
         final String scheme = uri.getScheme();
-        if ("intent".equals(scheme)) {
+        if ("intent".equals(scheme) || "android-app".equals(scheme)) {
             final Intent intent;
             try {
-                intent = Intent.parseUri(targetURI, Intent.URI_INTENT_SCHEME);
+                intent = Intent.parseUri(targetURI, 0);
             } catch (final URISyntaxException e) {
                 Log.e(LOGTAG, "Unable to parse URI - " + e);
                 return null;
             }
 
             // Prevent site from explicitly opening our internal activities, which can leak data.
             intent.setComponent(null);
             nullIntentSelector(intent);