android/usb: simply restart the download after receiving permission

If the user tries to download from a device that he hasn't given the app
permission to read from, Android will pop up a dialogue asking for that
permission. With this after giving the permission we continue (well,
technically, restart) the download which is likely the expected behavior.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-03-15 12:27:10 -07:00
parent 4619b4932e
commit 0b72495413
5 changed files with 70 additions and 12 deletions

View file

@ -235,6 +235,7 @@ public slots:
void rescanConnections();
#if defined(Q_OS_ANDROID)
void showDownloadPage(QAndroidJniObject usbDevice);
void restartDownload(QAndroidJniObject usbDevice);
void androidUsbPopoulateConnections();
QString getProductVendorConnectionIdx(android_usb_serial_device_descriptor descriptor);
#endif
@ -307,6 +308,7 @@ signals:
void oldStatusChanged();
void undoTextChanged();
void redoTextChanged();
void restartDownloadSignal();
// From upload process
void uploadFinish(bool success, const QString &text);