public class PermissionCheckUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
REQUEST_CODE_ASK_PERMISSIONS |
Constructor and Description |
---|
PermissionCheckUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canDrawOverlays(android.content.Context context) |
static boolean |
canDrawOverlays(android.content.Context context,
boolean needOpenPermissionSetting)
检查是否有悬浮窗权限
|
static boolean |
checkPermissions(android.content.Context context,
java.lang.String[] permissions) |
static boolean |
requestPermissions(Fragment fragment,
java.lang.String[] permissions) |
static boolean |
requestPermissions(Fragment fragment,
java.lang.String[] permissions,
int requestCode) |
static void |
showRequestPermissionFailedAlter(android.content.Context context,
java.lang.String[] permissions,
int[] grantResults) |
public static final int REQUEST_CODE_ASK_PERMISSIONS
public static boolean requestPermissions(Fragment fragment, java.lang.String[] permissions)
public static boolean requestPermissions(Fragment fragment, java.lang.String[] permissions, int requestCode)
public static boolean checkPermissions(android.content.Context context, java.lang.String[] permissions)
public static boolean canDrawOverlays(android.content.Context context)
public static boolean canDrawOverlays(android.content.Context context, boolean needOpenPermissionSetting)
context
- 上下文public static void showRequestPermissionFailedAlter(android.content.Context context, java.lang.String[] permissions, int[] grantResults)