diff options
author | Daniel Colascione <dancol@google.com> | 2019-11-04 11:33:58 -0800 |
---|---|---|
committer | Daniel Colascione <dancol@google.com> | 2019-11-04 11:43:20 -0800 |
commit | 3aef5c82f7ab469a2277198d8c7bf521b0c13c14 (patch) | |
tree | 4fdfb6dee7d4b609e7e37359a4c1fa4d3f2242f7 /libcutils/sockets_unix.cpp | |
parent | 57292aa6848bd1354ccfdcafdb8061f2a37e7625 (diff) |
Properly finish daemon init when initial USB scan complete
Call adb_notify_device_scan_complete when we finish enumerating USB
devices. The original intent of the code appears to have been to have
adb_wait_for_device_initialization return as soon as we've finished
looking around at the system USB environment on daemon startup, but at
some point, we forgot to actually notify the init thread that we
finished scanning all the USB devices, forcing the wait on init_cv to
time out after three seconds on every daemon initialization.
After this change, the daemon starts in a few milliseconds on my Linux
machine
Test: killall adb && sleep 1 && time adb server && adb shell ls
Change-Id: I0bc1da7a597d2077dd2b591560d03798b05905b7
Diffstat (limited to 'libcutils/sockets_unix.cpp')
0 files changed, 0 insertions, 0 deletions