diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-04-09 12:50:22 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-04-09 17:19:26 +0200 |
commit | d214ab444e73490f4c95dffd7f376978cbcd3ccc (patch) | |
tree | 2efab37845dea376c088fef4c18ab07a03acb436 /android/source | |
parent | 7d9db806d65cb814af1e99a1e79c3db5aa7c17d5 (diff) |
android: Check result for CREATE_NEW_DOCUMENT Intent
Only try to retrieve the file URI and load the document
if a file was actually selected.
Change-Id: Icd47c197b67d593e74874e8136233b6e41a1a68d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113845
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android/source')
-rw-r--r-- | android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index e7bb998bb826..9f1cd7a9089d 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -257,7 +257,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings if (requestCode == REQUEST_CODE_OPEN_FILECHOOSER && resultCode == RESULT_OK) { final Uri fileUri = data.getData(); openDocument(fileUri); - } else if (requestCode == REQUEST_CODE_CREATE_NEW_DOCUMENT) { + } else if (requestCode == REQUEST_CODE_CREATE_NEW_DOCUMENT && resultCode == RESULT_OK) { // "forward" to LibreOfficeMainActivity to create + open the file final Uri fileUri = data.getData(); loadNewDocument(newDocType, fileUri); |