Skip to content

Commit

Permalink
refactor: add PermissionUtils to check if all required permissions …
Browse files Browse the repository at this point in the history
…granted
  • Loading branch information
goofyz committed Dec 30, 2023
1 parent 3ee23b7 commit 50ca063
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/main/java/com/osfans/trime/util/PermissionUtils.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.osfans.trime.util

import android.content.Context
import com.hjq.permissions.Permission
import com.hjq.permissions.XXPermissions

object PermissionUtils {
@JvmStatic
fun isAllGranted(context: Context): Boolean {
return XXPermissions.isGranted(context, Permission.MANAGE_EXTERNAL_STORAGE)
}
}

0 comments on commit 50ca063

Please sign in to comment.