pull/1403/head
gedoor 3 years ago
parent c03329340c
commit f37a9ad879
  1. 5
      app/src/main/java/io/legado/app/ui/font/FontSelectDialog.kt

@ -1,6 +1,5 @@
package io.legado.app.ui.font
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.MenuItem
@ -46,10 +45,6 @@ class FontSelectDialog : BaseDialogFragment(R.layout.dialog_font_select),
putPrefString(PreferKey.fontFolder, uri.toString())
val doc = DocumentFile.fromTreeUri(requireContext(), uri)
if (doc != null) {
context?.contentResolver?.takePersistableUriPermission(
uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION
)
loadFontFiles(doc)
} else {
RealPathUtil.getPath(requireContext(), uri)?.let { path ->

Loading…
Cancel
Save