summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index c18b784e581b..f2e366c90ed3 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -258,9 +258,10 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings
private void showSystemFilePickerAndOpenFile() {
Intent intent = new Intent();
- try {
+ if (Build.VERSION.SDK_INT >= 19) {
intent.setAction(Intent.ACTION_OPEN_DOCUMENT);
- } catch (ActivityNotFoundException exception) {
+ }
+ else {
// Intent.ACTION_OPEN_DOCUMENT added in API level 19, but minSdkVersion is currently 16
intent.setAction(Intent.ACTION_GET_CONTENT);
}