Closed Bug 1498469 Opened 6 years ago Closed 5 years ago

[remote-dbg-next] Wait until ADB has started to show "USB enabled" message in Sidebar

Categories

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

enhancement

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: jdescottes, Assigned: ladybenko)

References

(Blocks 1 open bug)

Details

(Whiteboard: [remote-debugging-reserve])

Attachments

(2 files)

In Bug 1494549, we start showing a message when the ADB Addon is installed "ADB Devices enabled". 

However, after installing the addon, the addon-aware-adb-scanner automatically starts and will attempt to start ADB (devtools/shared/adb/abd.js). Starting ADB is async as it involves reading and unpacking the files from the addon. It might also fail for various reasons. We should also take this into account to decide to display the message. 

Some options here:

1/ listen to the "adb-ready" event emitted by ADB in aboutdebugging.js and check ADB.isReady when deciding to show the message

2/ same as 1/ but extracted in a module

3/ modify the scanner to expose a clearer status

I would tend to do 1 or 2 for now. I think in the future, the connect page will need to show if ADB failed to start, and propose to users to restart the scanner if it happened. So we will need to do 3/ ultimately, but it's better to wait until we know what kind of API we will need rather than implementing blindly now.
Assignee: nobody → balbeza
Status: NEW → ASSIGNED
Priority: P3 → P1
Whiteboard: [remote-debugging-reserve]
Pushed by balbeza@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/913c397010c2
Part 1: Wait until adb process is ready to show the 'Usb enabled' message r=jdescottes,daisuke
https://hg.mozilla.org/integration/autoland/rev/512231282d5f
Part 2: Add test for the feature r=jdescottes,daisuke
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: