adb: libusb: Clear halt of endpoints only on error
Clears halt condition for endpoints only when an error is encountered.
This logic was moved from LibUsbDevice::ClaimInterface() where calling
it as part of the open device flow would cause some Samsung devices to
enter a state where bulk transfers would fail. Removing this logic
from the open device flow for macOS and Linux now matches the behavior
on Windows where clearing the halt condition also doesn't take place
during open device flow.
Fixes: 404741058
Test: Validated that adb establishes connection with devices below:
Google Pixel 7, Android 14
Google Pixel 6a, Android 13
Google Pixel 6, Android 13, 14
Google Pixel 5, Android 11
Samsung Galaxy S24, Android 14
Samsung Galaxy S23, Android 14
Samsung Galaxy S23 Plus, Android 14
Samsung Galaxy S22, Android 14
Samsung Galaxy S22 Ultra, Android 13
Samsung Galaxy S20/S20+, Android 11, 13
Samsung Galaxy S21/S21+, Android 11, 13
Samsung Galaxy S8, Android 9
Signed-off-by: Yan Shapochnik <yannikshap@gmail.com>
(cherry picked from https://android-review.googlesource.com/q/commit:7592b197457338cc8b2015ae1af28e290ae90446)
(cherry picked from https://android-review.googlesource.com/q/commit:9f05211be618e4ff8ef0e3103ca8a08e74afe69a)
Merged-In: Ie8e7ea5c52f06c56653469efc09f765587ceca47
Change-Id: Ie8e7ea5c52f06c56653469efc09f765587ceca47
Flag: EXEMPT bugfix
3 files changed