android/usb: parse the usbDevice when responding to intent

This vastly simplifies our handling of devive information as we simply use
what is already in the descriptor. This way we do not duplicate information
about USB devices in the QMLManager.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-03-14 18:05:06 -07:00
parent b0eccec8ed
commit 4cd453dc92
2 changed files with 62 additions and 73 deletions

View file

@ -18,6 +18,10 @@
#include "core/settings/qPrefCloudStorage.h"
#include "core/subsurface-qt/divelistnotifier.h"
#if defined(Q_OS_ANDROID)
#include "core/serial_usb_android.h"
#endif
class QAction;
class DiveObjectHelper;
class DiveSiteChange; // An obscure implementation artifact - remove in due course.
@ -227,7 +231,9 @@ public slots:
void quit();
void hasLocationSourceChanged();
void btRescan();
void showDownloadPage(QString deviceString);
#if defined(Q_OS_ANDROID)
void showDownloadPage(QAndroidJniObject usbDevice);
#endif
void divesChanged(const QVector<dive *> &dives, DiveField field);
private: