diff options
Diffstat (limited to 'core/android.cpp')
-rw-r--r-- | core/android.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/core/android.cpp b/core/android.cpp index 0c4520ae4..b86f2e557 100644 --- a/core/android.cpp +++ b/core/android.cpp @@ -181,7 +181,7 @@ Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setUsbDevice(JNIEnv * if (usbDevice.isValid()) { android_usb_serial_device_descriptor descriptor = getDescriptor(usbDevice); - LOG(QString("called by intent for device %1").arg(QString::fromStdString(descriptor.uiRepresentation))); + LOG(QString("called by connect intent for device %1").arg(QString::fromStdString(descriptor.uiRepresentation))); } #if defined(SUBSURFACE_MOBILE) QMLManager::instance()->showDownloadPage(usbDevice); @@ -189,6 +189,25 @@ Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setUsbDevice(JNIEnv * return; } +JNIEXPORT void JNICALL +Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_restartDownload(JNIEnv *env, + jobject obj, + jobject javaUsbDevice) +{ + Q_UNUSED (obj) + Q_UNUSED (env) + QAndroidJniObject usbDevice(javaUsbDevice); + if (usbDevice.isValid()) { + android_usb_serial_device_descriptor descriptor = getDescriptor(usbDevice); + + LOG(QString("called by permission granted intent for device %1").arg(QString::fromStdString(descriptor.uiRepresentation))); + } +#if defined(SUBSURFACE_MOBILE) + QMLManager::instance()->restartDownload(usbDevice); +#endif + return; +} + /* NOP wrappers to comform with windows.c */ int subsurface_rename(const char *path, const char *newpath) { |