Closed Bug 1508956 Opened 6 years ago Closed 5 years ago

[remote-dbg-next] Show new USB devices in sidebar before runtime started

Categories

(DevTools :: about:debugging, enhancement, P1)

enhancement

Tracking

(firefox66 fixed)

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

Attached image image.png
In the initial mockups for remote debugging ng (https://mozilla.invisionapp.com/share/F9IVW9WPG4W#/screens/297684721) we said that we should show connected USB devices in the sidebar even if the debuggable runtime hasn't started.

See screenshot from the original mockups.
Priority: -- → P2
Depends on: 1501638
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: P2 → P1
The model information is duplicated between adb runtime and adb device.
This allows to keep the information in a single place.
Depends on D14307. Introduce a placeholder UnknownAdbRuntime extending AdbRuntime.
AdbRuntime implements isUnknown(). This method is used to filter out the unknown runtimes in
webide and about:debugging. (filter will be removed in about:debugging in a patch in the same
queue)
Depends on D14309. Relying on head_mocks will make it easier to
update the mocks when we start calling isUnknown() on our USB runtimes.
Depends on D14310. This patch enables displaying devices on which the debuggable
runtime is not started yet. To test it, simply use an android phone with USB debugging enabled
but don't start Firefox yet. You should see the Unknown Runtime item in the sidebar.

Not that once you start Firefox on the device, you need to click refresh runtimes here to get
the sidebar to refresh (more on that in the last patch of the series).

Two things I am not completely happy with: 
- calling this a runtime, when really it's just a device that has no runtime.
  but I don't want to start renaming all our state for that. Hope we can treat it as
  placeholder runtime, and forget about it.
- localization for the runtime item name can be done in many ways. Not using getString 
  at all makes things really complicated, but I'm open to suggestions if you have any
Depends on D14318. This patch introduces a setInterval to check if
new runtimes have appeared on monitored devices, directly from ADB. This is
one of the scenarios where we don't get an update from ADB. ADB is able to 
track devices appearing or disappearing but here we are looking for a new 
process, containing a specific string. Out of the box I don't think we can
do anything for this. 

Maybe we could ask the devtools server to "broadcast" its presence when it
starts, but at the moment I am not sure how we should implement that.
Keywords: leave-open
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87e9d7660f1b
Refactor AdbDevice to have an async initialize step;r=daisuke
https://hg.mozilla.org/integration/autoland/rev/71af9cefc4ab
Add unknown runtime entries for devices with no runtime detected;r=daisuke
https://hg.mozilla.org/integration/autoland/rev/e63355818e19
Migrate sidebar_usb_runtime to use head_mocks;r=daisuke
https://hg.mozilla.org/integration/autoland/rev/3b9db2fd0679
Display unknown runtimes in about:debugging;r=daisuke,ladybenko,Ola
https://hg.mozilla.org/integration/autoland/rev/fb34e295bcf4
Add test for unknown USB runtimes;r=daisuke,ladybenko,Ola
Keywords: leave-open
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ebd7cddb2718
Check for ADB runtimes updates periodically;r=daisuke,ladybenko
https://hg.mozilla.org/mozilla-central/rev/ebd7cddb2718
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: