|
|
@ -107,7 +107,7 @@ class FileAssociationActivity : |
|
|
|
intent.data?.let { data -> |
|
|
|
intent.data?.let { data -> |
|
|
|
if (data.isContentScheme()) { |
|
|
|
if (data.isContentScheme()) { |
|
|
|
viewModel.dispatchIndent(data) |
|
|
|
viewModel.dispatchIndent(data) |
|
|
|
} else { |
|
|
|
} else if (!AppConfig.isGooglePlay || Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) { |
|
|
|
PermissionsCompat.Builder(this) |
|
|
|
PermissionsCompat.Builder(this) |
|
|
|
.addPermissions(*Permissions.Group.STORAGE) |
|
|
|
.addPermissions(*Permissions.Group.STORAGE) |
|
|
|
.rationale(R.string.tip_perm_request_storage) |
|
|
|
.rationale(R.string.tip_perm_request_storage) |
|
|
@ -116,6 +116,8 @@ class FileAssociationActivity : |
|
|
|
}.onDenied { |
|
|
|
}.onDenied { |
|
|
|
toastOnUi("请求存储权限失败。") |
|
|
|
toastOnUi("请求存储权限失败。") |
|
|
|
}.request() |
|
|
|
}.request() |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
toastOnUi("由于安卓系统限制,请使用系统文件管理重新打开。") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|