public abstract class Permissions extends Object
has(Context, String) and for set of permissions can be used hasAllOf(Context, String...)
or hasAnyOf(Context, String...) methods.| Modifier | Constructor and Description |
|---|---|
protected |
Permissions()
Creates a new empty instance of Permissions.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
has(android.content.Context context,
String permission)
Checks whether the specified permission is granted for the current process and
user id.
|
static boolean |
hasAllOf(android.content.Context context,
String... permissions)
Checks whether all of the specified permissions are granted for the current process
and user id.
|
static boolean |
hasAnyOf(android.content.Context context,
String... permissions)
Checks whether any of the specified permissions is granted for the current process
and user id.
|
protected Permissions()
public static boolean hasAnyOf(android.content.Context context,
String... permissions)
context - Context used to check permission.permissions - The desired set of permissions to check if they are granted.True if at least one of the specified permissions is granted, false
otherwise.has(Context, String),
hasAllOf(Context, String...)public static boolean hasAllOf(android.content.Context context,
String... permissions)
context - Context used to check permission.permissions - The desired set of permissions to check if they are granted.True if all of the specified permissions are granted, false otherwise.has(Context, String),
hasAnyOf(Context, String...)public static boolean has(android.content.Context context,
String permission)
context - Context used to check permission.permission - The desired permission to check if it is granted.True if the specified permission is granted, false otherwise.Context.checkPermission(String, int, int),
Manifest.permission