调整了餐盘在不同设备提示

This commit is contained in:
zxj
2025-07-24 08:40:36 +08:00
parent 7fd2ccb960
commit 082011a939
17 changed files with 198 additions and 35 deletions
@@ -30,7 +30,7 @@ class PermissionHelper private constructor(
/**
* 检查是否已授予所有权限
*/
fun areAllPermissionsGranted(context: Context, permissions: Array<String>): Boolean {
fun checkPermissions(context: Context, permissions: Array<String>): Boolean {
return permissions.all { permission ->
ContextCompat.checkSelfPermission(
context,
@@ -121,7 +121,7 @@ class PermissionHelper private constructor(
* 检查并请求权限
*/
fun checkAndRequest() {
if (areAllPermissionsGranted(context, permissions)) {
if (checkPermissions(context, permissions)) {
onGranted?.invoke()
} else {
requestPermissions()