| java.lang.Object | |
| ↳ | com.davidluoye.support.app.Permission |
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | KEY_CALLBACK | ||||||||||
| String | KEY_EXTRA | ||||||||||
| String | KEY_PERMISSION | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Permission() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static int |
checkCallingPermission(String permission)
Determine whether the calling process of an IPC you are handling has been
granted a particular permission.
| ||||||||||
| static int |
checkPermission(String permission, int pid, int uid)
Determine whether the given permission is allowed for a particular
process and user ID running in the system.
| ||||||||||
| static int |
checkSelfPermission(String permission)
Determine whether you have been granted a particular permission.
| ||||||||||
| static String[] |
getDeniedPermissions(String[] permissions)
Get the denied permissions
| ||||||||||
| static boolean | hasPermission(String permission) | ||||||||||
| static void |
requestPermission(Context context, String[] permissions)
Start a permission activity
| ||||||||||
| static void |
requestPermission(Context context, PermissionCallBack callback)
Start a permission activity
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Determine whether the calling process of an IPC you are handling has been
granted a particular permission. This is basically the same as calling
checkPermission(String, int, int) with the pid and uid returned
by getCallingPid() and
getCallingUid(). One important difference
is that if you are not currently processing an IPC, this function
will always fail. This is done to protect against accidentally
leaking permissions;
| permission | The name of the permission being checked. |
|---|
PERMISSION_GRANTED if the calling
pid/uid is allowed that permission, or
PERMISSION_DENIED if it is not.Determine whether the given permission is allowed for a particular process and user ID running in the system.
| permission | The name of the permission being checked. |
|---|---|
| pid | The process ID being checked against. Must be > 0. |
| uid | The user ID being checked against.
A uid of 0 is the root user, which will pass every permission check. |
PERMISSION_GRANTED if the given
pid/uid is allowed that permission, or
PERMISSION_DENIED if it is not.
Determine whether you have been granted a particular permission.
| permission | The name of the permission being checked. |
|---|
PERMISSION_GRANTED if you have the
permission, or PERMISSION_DENIED if not.Get the denied permissions
| permissions | The name of the permissions being checked. |
|---|
Start a permission activity
| permissions | request permission array. |
|---|
Start a permission activity
| callback | permission state changed callback |
|---|