| commit | d214ab444e73490f4c95dffd7f376978cbcd3ccc | [log] |
|---|---|---|
| author | Michael Weghorn <m.weghorn@posteo.de> | Fri Apr 09 12:50:22 2021 +0200 |
| committer | Michael Weghorn <m.weghorn@posteo.de> | Fri Apr 09 17:19:26 2021 +0200 |
| tree | 2efab37845dea376c088fef4c18ab07a03acb436 | |
| 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>
diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index e7bb998..9f1cd7a 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);