From 57d200176c1a5aea49545d40ce2c45da4506c45f Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 29 Jan 2020 21:30:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/importbook/ImportBookActivity.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt b/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt index 4dcd75776..191dbc10a 100644 --- a/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/importbook/ImportBookActivity.kt @@ -79,7 +79,12 @@ class ImportBookActivity : VMBaseActivity(R.layout.activity when (requestCode) { requestCodeSelectFolder -> if (resultCode == Activity.RESULT_OK) { data?.data?.let { - + contentResolver.takePersistableUriPermission( + it, + Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION + ) + AppConfig.importBookPath = it.toString() + upPath() } } }