tweak the OPEN_DOCUMENT_TREE intent

This commit is contained in:
tibbi 2017-03-25 14:27:38 +01:00
parent 8bcd5f7f6a
commit 55b568223a
2 changed files with 5 additions and 3 deletions

View file

@ -29,5 +29,5 @@ ext {
propMinSdkVersion = 16
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '2.14.3'
propVersionName = '2.14.6'
}

View file

@ -21,8 +21,10 @@ fun Activity.isShowingSAFDialog(file: File, treeUri: String, requestCode: Int):
runOnUiThread {
WritePermissionDialog(this) {
Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).apply {
type = "*/*"
startActivityForResult(intent, requestCode)
if (resolveActivity(packageManager) == null) {
type = "*/*"
}
startActivityForResult(this, requestCode)
}
}
}