diff options
author | Christof Arnosti <charno@charno.ch> | 2020-03-15 15:12:53 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-16 07:58:20 -0700 |
commit | 87e12029f9cfa0ffea6499c3bc186a0177cbe172 (patch) | |
tree | cc6d6e7db1cfe5ba59a65f435ec7cda4f39a5978 /core | |
parent | ff2f199eed20b11386887ab55c8d4de43a32bb19 (diff) | |
download | subsurface-87e12029f9cfa0ffea6499c3bc186a0177cbe172.tar.gz |
android/usb: remove "autoselect driver" option for unknown VID/PIDs
Signed-off-by: Christof Arnosti <charno@charno.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/serial_usb_android.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
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<android_usb_serial_device_descriptor> serial_usb_android_get_devices() { - std::vector<std::string> driverNames = { "", "CdcAcmSerialDriver", "Ch34xSerialDriver", "Cp21xxSerialDriver", "FtdiSerialDriver", "ProlificSerialDriver" }; + std::vector<std::string> driverNames = { "CdcAcmSerialDriver", "Ch34xSerialDriver", "Cp21xxSerialDriver", "FtdiSerialDriver", "ProlificSerialDriver" }; // Get the current main activity of the application. QAndroidJniObject activity = QtAndroid::androidActivity(); @@ -333,10 +333,7 @@ std::vector<android_usb_serial_device_descriptor> 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<android_usb_serial_device_descriptor> 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; |