Refactor should_use_libusb
The function used to be called before libusb was setup.
Now is it a prompt for the state of the USB backend.
Test: NA
Bug: NA
Change-Id: Ib9be4ddb0282c9101c0362684d27b676047813eb
diff --git a/adb.cpp b/adb.cpp
index ab4e6c4..54d1854 100644
--- a/adb.cpp
+++ b/adb.cpp
@@ -1327,7 +1327,7 @@
if (service == "server-status") {
adb::proto::AdbServerStatus status;
- if (should_use_libusb()) {
+ if (is_libusb_enabled()) {
status.set_usb_backend(adb::proto::AdbServerStatus::LIBUSB);
} else {
status.set_usb_backend(adb::proto::AdbServerStatus::NATIVE);
@@ -1400,7 +1400,7 @@
if (service == "host-features") {
FeatureSet features = supported_features();
// Abuse features to report libusb status.
- if (should_use_libusb()) {
+ if (is_libusb_enabled()) {
features.emplace_back(kFeatureLibusb);
}
features.emplace_back(kFeaturePushSync);