summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2020-04-27 11:51:09 +0300
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2020-05-12 16:15:52 +0300
commitfbd0e66705be8db52a67a809f28697dfa1f38e2f (patch)
treef4fbb4faee201c117cbf90b2649bed44c9138868
parent4edcf3ddb8a79095cc527d671bcbee0d318c7293 (diff)
Android: allow file dialog to use remote locations
Allow the native file dialog to use remote locations like OneDrive, Google Drive, etc. Pick-to: 5.15 Change-Id: I67027f0da8e6bd759a4936e03b6c9e95f3f90e1a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r--src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp9
-rw-r--r--src/plugins/platforms/android/qandroidplatformfiledialoghelper.h1
2 files changed, 0 insertions, 10 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp b/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp
index 2e29a22cf7..689997f1eb 100644
--- a/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp
+++ b/src/plugins/platforms/android/qandroidplatformfiledialoghelper.cpp
@@ -118,14 +118,6 @@ void QAndroidPlatformFileDialogHelper::takePersistableUriPermission(const QJNIOb
uri.object(), modeFlags);
}
-void QAndroidPlatformFileDialogHelper::setLocalFilesOnly(bool localOnly)
-{
- const QJNIObjectPrivate extraLocalOnly = QJNIObjectPrivate::getStaticObjectField(
- JniIntentClass, "EXTRA_LOCAL_ONLY", "Ljava/lang/String;");
- m_intent.callObjectMethod("putExtra", "(Ljava/lang/String;Z)Landroid/content/Intent;",
- extraLocalOnly.object(), localOnly);
-}
-
void QAndroidPlatformFileDialogHelper::setIntentTitle(const QString &title)
{
const QJNIObjectPrivate extraTitle = QJNIObjectPrivate::getStaticObjectField(
@@ -237,7 +229,6 @@ bool QAndroidPlatformFileDialogHelper::show(Qt::WindowFlags windowFlags, Qt::Win
}
setIntentTitle(options()->windowTitle());
- setLocalFilesOnly(true);
QtAndroidPrivate::registerActivityResultListener(this);
m_activity.callMethod<void>("startActivityForResult", "(Landroid/content/Intent;I)V",
diff --git a/src/plugins/platforms/android/qandroidplatformfiledialoghelper.h b/src/plugins/platforms/android/qandroidplatformfiledialoghelper.h
index fa9c3f47b3..5a7a28a8a0 100644
--- a/src/plugins/platforms/android/qandroidplatformfiledialoghelper.h
+++ b/src/plugins/platforms/android/qandroidplatformfiledialoghelper.h
@@ -75,7 +75,6 @@ public:
private:
QJNIObjectPrivate getFileDialogIntent(const QString &intentType);
void takePersistableUriPermission(const QJNIObjectPrivate &uri);
- void setLocalFilesOnly(bool localOnly);
void setIntentTitle(const QString &title);
void setOpenableCategory();
void setAllowMultipleSelections(bool allowMultiple);