mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Android: don't list devices with unsupported transport
We know that we cannot support native USB, USB HID, IRDA, and USB storage on Android. On the flip side, don't try to force the long broken FTDI download. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2fcd4fff0a
commit
e5c62f0858
2 changed files with 4 additions and 6 deletions
|
@ -76,11 +76,6 @@ void DownloadThread::run()
|
|||
qDebug() << "No download possible when DC type is unknown";
|
||||
return;
|
||||
}
|
||||
#if defined(Q_OS_ANDROID)
|
||||
// on Android we either use BT, a USB device, or we download via FTDI cable
|
||||
if (!internalData->bluetooth_mode && (same_string(internalData->devname, "FTDI") || same_string(internalData->devname, "")))
|
||||
internalData->devname = "ftdi";
|
||||
#endif
|
||||
qDebug() << "Starting download from " << (internalData->bluetooth_mode ? "BT" : internalData->devname);
|
||||
qDebug() << "downloading" << (internalData->force_download ? "all" : "only new") << "dives";
|
||||
clear_dive_table(&downloadTable);
|
||||
|
|
|
@ -1235,7 +1235,10 @@ unsigned int get_supported_transports(device_data_t *data)
|
|||
#if defined(BLE_SUPPORT)
|
||||
supported |= DC_TRANSPORT_BLE;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
// we cannot support transports that need libusb, hid, filesystem access, or IRDA on Android
|
||||
supported &= ~(DC_TRANSPORT_USB | DC_TRANSPORT_USBHID | DC_TRANSPORT_IRDA | DC_TRANSPORT_USBSTORAGE);
|
||||
#endif
|
||||
if (data) {
|
||||
/*
|
||||
* If we have device data available, we can refine this:
|
||||
|
|
Loading…
Add table
Reference in a new issue