Bug 1493104 - Add adbScanner to WebIDE scanners if status is already installed;r=ladybenko,daisuke
☠☠ backed out by c24bf7117053 ☠ ☠
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 10 Oct 2018 11:29:58 +0000
changeset 498888 cb9f55dd42570c4568d45c54ceb5176c3543df1c
parent 498887 f7ecf841eb8fc2cdc516a9720f0a555c7f1e9b16
child 498889 8df2a288391c37d980e5ec0ddbf98c449ec12e6c
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersladybenko, daisuke
bugs1493104
milestone64.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 1493104 - Add adbScanner to WebIDE scanners if status is already installed;r=ladybenko,daisuke Depends on D7873. This fixes the following scenario: - install ADB - connect a Device - start about:debugging => device shows up in sidebar - start WebIDE => device should show up in WebIDE Differential Revision: https://phabricator.services.mozilla.com/D7875
devtools/client/webide/content/addons.js
--- a/devtools/client/webide/content/addons.js
+++ b/devtools/client/webide/content/addons.js
@@ -51,16 +51,21 @@ function BuildUI() {
   function onAddonProgress(arg) {
     if (arg == -1) {
       progress.removeAttribute("value");
     } else {
       progress.value = arg;
     }
   }
 
+  // If the addon is already installed on startup, add the adbScanner to our
+  // RuntimesScanner.
+  if (adbAddon.status === ADB_ADDON_STATES.INSTALLED) {
+    RuntimeScanners.add(adbScanner);
+  }
   adbAddon.on("update", onAddonUpdate);
   adbAddon.on("failure", onAddonFailure);
   adbAddon.on("progress", onAddonProgress);
 
   window.addEventListener("unload", function() {
     adbAddon.off("update", onAddonUpdate);
     adbAddon.off("failure", onAddonFailure);
     adbAddon.off("progress", onAddonProgress);