[Libreoffice-commits] online.git: android/app
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 21 17:41:07 UTC 2020
android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 3840b42e98fd2276b85d55032447f04f02ac46eb
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 21 17:33:10 2020 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Feb 21 18:40:48 2020 +0100
android shell: When creating documents, try to default to the Documents dir.
No idea if all the devices have this, and also it is API 26+, but at
least something; the default view is a mess.
Change-Id: Icd9aa588885e91bc7b35285044fdcfc335d426d9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89231
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
index dff39f242..a4a69b2fc 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
@@ -27,6 +27,7 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
+import android.provider.DocumentsContract;
import android.provider.Settings;
import android.text.Editable;
import android.text.TextUtils;
@@ -553,9 +554,9 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
i.putExtra(Intent.EXTRA_TITLE, defaultFileName);
- // TODO remember where the user picked the file the last time
- // TODO and that should default to Context.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS)
- //i.putExtra(DocumentsContract.EXTRA_INITIAL_URI, previousDirectoryPath);
+ // Try to default to the Documents folder
+ Uri documentsUri = Uri.parse("content://com.android.externalstorage.documents/document/home%3A");
+ i.putExtra(DocumentsContract.EXTRA_INITIAL_URI, documentsUri);
startActivityForResult(i, requestCode);
}
More information about the Libreoffice-commits
mailing list