From 58f05434a95ab331fd524c19eb9b0f0580247511 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 23 Mar 2017 18:51:15 +0100 Subject: [PATCH] add a type to open_document_tree intent --- .../com/simplemobiletools/commons/extensions/Activity.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt index 9a2a1ccfe..d9914797e 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Activity.kt @@ -20,8 +20,10 @@ fun Activity.isShowingSAFDialog(file: File, treeUri: String, requestCode: Int): return if ((needsStupidWritePermissions(file.absolutePath) && treeUri.isEmpty())) { runOnUiThread { WritePermissionDialog(this) { - val intent = Intent(Intent.ACTION_OPEN_DOCUMENT_TREE) - startActivityForResult(intent, requestCode) + Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).apply { + type = "*/*" + startActivityForResult(intent, requestCode) + } } } true