pull/2718/head
kunfei 2 years ago
parent 97c0edf86e
commit 8509276008
  1. 22
      app/src/main/java/io/legado/app/lib/permission/Request.kt

@ -84,18 +84,18 @@ internal class Request : OnRequestPermissionsResultCallback {
}
} else {
if (deniedPermissions != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R
&& deniedPermissions.contains(Permissions.MANAGE_EXTERNAL_STORAGE)
) {
source?.context?.startActivity<PermissionActivity> {
putExtra(
PermissionActivity.KEY_INPUT_REQUEST_TYPE,
TYPE_MANAGE_ALL_FILES_ACCESS_PERMISSION
)
putExtra(PermissionActivity.KEY_INPUT_PERMISSIONS_CODE, requestCode)
putExtra(PermissionActivity.KEY_INPUT_PERMISSIONS, deniedPermissions)
if (deniedPermissions.contains(Permissions.MANAGE_EXTERNAL_STORAGE)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
source?.context?.startActivity<PermissionActivity> {
putExtra(
PermissionActivity.KEY_INPUT_REQUEST_TYPE,
TYPE_MANAGE_ALL_FILES_ACCESS_PERMISSION
)
putExtra(PermissionActivity.KEY_INPUT_PERMISSIONS_CODE, requestCode)
putExtra(PermissionActivity.KEY_INPUT_PERMISSIONS, deniedPermissions)
}
}
} else if (!deniedPermissions.contains(Permissions.MANAGE_EXTERNAL_STORAGE)) {
} else if (deniedPermissions.size > 1) {
source?.context?.startActivity<PermissionActivity> {
putExtra(PermissionActivity.KEY_INPUT_REQUEST_TYPE, TYPE_REQUEST_PERMISSION)
putExtra(PermissionActivity.KEY_INPUT_PERMISSIONS_CODE, requestCode)

Loading…
Cancel
Save