Bug 1493104 - Add adbScanner to WebIDE scanners if status is already installed;r=ladybenko,daisuke
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 05 Oct 2018 11:21:04 +0200
changeset 498961 5ed3ff9c48f5fb019808b03a4fad45f9dfd74435
parent 498960 a56d01a749647c9bb733ee790bc2111e61a7591d
child 498962 ba67a0aadb68e1df04cf999a9a99e48d40b7d9f8
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 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
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);