commit | 09628bb538d331915c80d3d11a461ead57846582 | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Tue May 30 17:03:41 2017 -0700 |
committer | Josh Gao <jmgao@google.com> | Tue May 30 17:09:42 2017 -0700 |
tree | f89e997a71983a414090e128107bd14f06ae5de6 | |
parent | 087f7a485b4d8c85ed09469ada58219f9051e6f7 [diff] |
adb: fix deadlock. libusb hotplug callbacks are called with the libusb lock taken, and we call into libusb with our local mutex, so we need to enforce an ordering between the two. Instead of calling device_connected or device_disconnected directly, enqueue them onto the main thread. Bug: http://b/62200735 Test: manually hotplugged a device Change-Id: Ic5d55db83b47f4bb60f124ce94ddfe06f5f1a0c6