Bug 1529258 - Part 2: Catch apps that register only generic HTTPS handlers, too. r=geckoview-reviewers,snorp
authorJan Henning <jh+bugzilla@buttercookie.de>
Mon, 25 Feb 2019 19:46:28 +0000
changeset 519075 13ac435c29366bfe5688ea06fbc580e7dd96d24d
parent 519074 66d9e6a13efc5a05b57ee83be94d9194983fb442
child 519076 cd6d699aabde2bb4c4b6d1e70682549e5dc9dcb7
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgeckoview-reviewers, snorp
bugs1529258
milestone67.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 1529258 - Part 2: Catch apps that register only generic HTTPS handlers, too. r=geckoview-reviewers,snorp While it's not clear how many apps might still have a generic HTTP-only intent- filter at this stage, we only collect that information once per session, so to be on the safe side we still check both schemes separately and merge the data. Differential Revision: https://phabricator.services.mozilla.com/D20860
mobile/android/modules/HelperApps.jsm
--- a/mobile/android/modules/HelperApps.jsm
+++ b/mobile/android/modules/HelperApps.jsm
@@ -36,21 +36,30 @@ class App {
     HelperApps._launchApp(this, uri, callback);
     return false;
   }
 }
 
 var HelperApps =  {
   get defaultBrowsers() {
     delete this.defaultBrowsers;
-    this.defaultBrowsers = this._getHandlers("http://www.example.com", {
+    this.defaultBrowsers = this._collectDefaultBrowsers();
+    return this.defaultBrowsers;
+  },
+
+  _collectDefaultBrowsers() {
+    let httpHandlers = this._getHandlers("http://www.example.com", {
       filterBrowsers: false,
       filterHtml: false,
     });
-    return this.defaultBrowsers;
+    let httpsHandlers = this._getHandlers("https://www.example.com", {
+      filterBrowsers: false,
+      filterHtml: false,
+    });
+    return {...httpHandlers, ...httpsHandlers};
   },
 
   // Finds handlers that have registered for text/html pages or urls ending in html. Some apps, like
   // the Samsung Video player will only appear for these urls, while some Browsers (like Link Bubble)
   // won't register here because of the text/html mime type.
   get defaultHtmlHandlers() {
     delete this.defaultHtmlHandlers;
     return this.defaultHtmlHandlers = this._getHandlers("http://www.example.com/index.html", {