fix: permission

This commit is contained in:
Kagura 2024-10-13 21:23:23 +08:00
parent c44c226220
commit 23b7b6c6eb
3 changed files with 2 additions and 14 deletions

View file

@ -112,18 +112,6 @@ fun checkPermissions(context: Context): Boolean {
if (!Environment.isExternalStorageManager()) {
return false
}
if (VERSION.SDK_INT >= VERSION_CODES.TIRAMISU) {
val perm33 = arrayOf(
permission.READ_MEDIA_AUDIO,
permission.READ_MEDIA_VIDEO,
permission.READ_MEDIA_IMAGES
)
perm33.forEach {
if (context.checkSelfPermission(it) != PackageManager.PERMISSION_GRANTED) {
return false
}
}
}
} else {
val permissions = arrayOf(permission.READ_EXTERNAL_STORAGE, permission.WRITE_EXTERNAL_STORAGE)
permissions.forEach {

View file

@ -9,4 +9,4 @@ page_size = "0.6.0"
sysinfo = "0.32.0"
[lib]
crate_type = ["cdylib"]
crate-type = ["cdylib"]

View file

@ -1,4 +1,4 @@
fn main() {
println!("cargo:rustc-link-arg=-z");
println!("cargo:rustc-link-arg=max-page-size=16384");
println!("cargo:rustc-link-arg=max-page-size={}",1024*16);
}