adb: libusb: recognize devices with multiple interfaces.
A bug was introduced by commit 8bf37d7a wherein we accidentally only
look at the first interface of a device when checking whether a USB
device was an ADB device or not.
Bug: http://b/38201318
Test: none
Change-Id: I8e8e0963c77cd2cb03538d926ab735f4b57e52b7
This commit is contained in:
parent
3f60a968e3
commit
425aefdcf0
1 changed files with 3 additions and 3 deletions
|
|
@ -237,7 +237,7 @@ static void process_device(libusb_device* device) {
|
|||
// TODO: Is this assumption valid?
|
||||
LOG(VERBOSE) << "skipping interface with incorrect num_altsetting at " << device_address
|
||||
<< " (interface " << interface_num << ")";
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
const libusb_interface_descriptor& interface_desc = interface.altsetting[0];
|
||||
|
|
@ -245,7 +245,7 @@ static void process_device(libusb_device* device) {
|
|||
interface_desc.bInterfaceProtocol)) {
|
||||
LOG(VERBOSE) << "skipping non-adb interface at " << device_address << " (interface "
|
||||
<< interface_num << ")";
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
LOG(VERBOSE) << "found potential adb interface at " << device_address << " (interface "
|
||||
|
|
@ -261,7 +261,7 @@ static void process_device(libusb_device* device) {
|
|||
const uint8_t transfer_type = endpoint_attr & LIBUSB_TRANSFER_TYPE_MASK;
|
||||
|
||||
if (transfer_type != LIBUSB_TRANSFER_TYPE_BULK) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (endpoint_is_output(endpoint_addr) && !found_out) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue