From ac8b31c5e486d11ff3fc243b8818e8c941457924 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sun, 14 Jan 2024 18:30:45 +0700 Subject: [PATCH] Fix crash when sending dataset which include sidecar files --- platform/android/src/ch/opengis/qfield/QFieldActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/android/src/ch/opengis/qfield/QFieldActivity.java b/platform/android/src/ch/opengis/qfield/QFieldActivity.java index a86d81a503..490153b373 100644 --- a/platform/android/src/ch/opengis/qfield/QFieldActivity.java +++ b/platform/android/src/ch/opengis/qfield/QFieldActivity.java @@ -714,6 +714,8 @@ private void triggerUpdateProjectFromArchive(String path) { } private void sendDatasetTo(String paths) { + showBlockingProgressDialog(getString(R.string.processing_message)); + executorService.execute(new Runnable() { @Override public void run() { @@ -722,8 +724,6 @@ public void run() { if (filePaths.length == 1) { file = new File(paths); } else { - showBlockingProgressDialog( - getString(R.string.processing_message)); File temporaryFile = new File(filePaths[0]); file = new File(getCacheDir(), temporaryFile.getName() + ".zip"); @@ -742,8 +742,9 @@ public void run() { return; } } - DocumentFile documentFile = DocumentFile.fromFile(file); + dismissBlockingProgressDialog(); + Context context = getApplication().getApplicationContext(); Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_STREAM,