From 87e12029f9cfa0ffea6499c3bc186a0177cbe172 Mon Sep 17 00:00:00 2001 From: Christof Arnosti Date: Sun, 15 Mar 2020 15:12:53 +0100 Subject: android/usb: remove "autoselect driver" option for unknown VID/PIDs Signed-off-by: Christof Arnosti Signed-off-by: Dirk Hohndel --- core/serial_usb_android.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'core/serial_usb_android.cpp') diff --git a/core/serial_usb_android.cpp b/core/serial_usb_android.cpp index 7583f5011..ff2cd7945 100644 --- a/core/serial_usb_android.cpp +++ b/core/serial_usb_android.cpp @@ -305,7 +305,7 @@ android_usb_serial_device_descriptor getDescriptor(QAndroidJniObject usbDevice) std::vector serial_usb_android_get_devices() { - std::vector driverNames = { "", "CdcAcmSerialDriver", "Ch34xSerialDriver", "Cp21xxSerialDriver", "FtdiSerialDriver", "ProlificSerialDriver" }; + std::vector driverNames = { "CdcAcmSerialDriver", "Ch34xSerialDriver", "Cp21xxSerialDriver", "FtdiSerialDriver", "ProlificSerialDriver" }; // Get the current main activity of the application. QAndroidJniObject activity = QtAndroid::androidActivity(); @@ -333,10 +333,7 @@ std::vector serial_usb_android_get_devices std::string ui = descriptor.uiRepresentation; for (std::string driverName : driverNames) { descriptor.className = driverName; - if (driverName != "") - descriptor.uiRepresentation = ui + " (" + driverName + ")"; - else - descriptor.uiRepresentation = ui + " (autoselect driver)"; + descriptor.uiRepresentation = ui + " (" + driverName + ")"; retval.push_back(descriptor); } } @@ -345,10 +342,9 @@ std::vector serial_usb_android_get_devices } /* - * For testing and compatibility only, can be removed after the UI changes. Behaves exactly like the "old" - * implementation if only one device is attached. + * Open the USB Device described by androidUsbDevice */ -dc_status_t serial_usb_android_open(dc_iostream_t **iostream, dc_context_t *context, void *androidUsbDevice) +dc_status_t serial_usb_android_open(dc_iostream_t **iostream, dc_context_t *context, /*android_usb_serial_device_descriptor*/ void *androidUsbDevice) { if (!androidUsbDevice) return DC_STATUS_NODEVICE; -- cgit v1.2.3-70-g09d2