From 5dc87d7fee4bc6b5a960654eb7df6ceb2d5e1069 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 19 Mar 2020 11:00:12 +0100 Subject: [PATCH] Specify initial dir for file selection --- app/src/main/java/eu/faircode/email/Helper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 520c5457b9..5ff99be2f4 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -44,6 +44,7 @@ import android.os.LocaleList; import android.os.Parcel; import android.os.PowerManager; import android.os.StatFs; +import android.provider.DocumentsContract; import android.security.KeyChain; import android.security.KeyChainAliasCallback; import android.security.KeyChainException; @@ -923,6 +924,8 @@ public class Helper { intent.putExtra("android.content.extra.FANCY", true); intent.putExtra("android.content.extra.SHOW_FILESIZE", true); intent.putExtra("android.provider.extra.SHOW_ADVANCED", true); + File initial = Environment.getExternalStorageDirectory(); + intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, Uri.fromFile(initial)); } // Cryptography