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);