android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d214ab444e73490f4c95dffd7f376978cbcd3ccc
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Apr 9 12:50:22 2021 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Apr 9 17:19:26 2021 +0200

    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.wegh...@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 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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to