public class Permission extends Object
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static interface |
Permission.OnRequestPermissionsResult |
已过时。
This change is effective since API version 4.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static boolean |
canRequestPermissionFromRemote(String permission,
String nodeId) |
已过时。
This change is effective since API version 4.
|
static void |
requestPermissionsFromRemote(String[] permissions,
Permission.OnRequestPermissionsResult callback,
String nodeId,
String bundleName,
int reasonResId) |
已过时。
This change is effective since API version 4.
|
static int |
verifyPermissionFromRemote(String permission,
String nodeId,
String appIdInfo) |
已过时。
This change is effective since API version 4.
|
static int |
verifySelfPermissionFromRemote(String permission,
String nodeId) |
已过时。
This change is effective since API version 4.
|
@Deprecated public static boolean canRequestPermissionFromRemote(String permission, String nodeId)
permission - Indicates the permission name.nodeId - Indicates the network ID of the remote device. It cannot be null.true if this application can request the specified sensitive permission
from the remote device; returns false otherwise.@Deprecated public static void requestPermissionsFromRemote(String[] permissions, Permission.OnRequestPermissionsResult callback, String nodeId, String bundleName, int reasonResId)
The request result is returned through OnRequestPermissionsResult.
permissions - Indicates the list of sensitive permissions to request.callback - Indicates the callback to notify the request result. For details, see
OnRequestPermissionsResult.nodeId - Indicates the network ID of the remote device. It cannot be null.bundleName - Indicates the bundle name of the application that requests the permissions.reasonResId - Indicates the ID of the resource that will use the requested permissions.@Deprecated public static int verifyPermissionFromRemote(String permission, String nodeId, String appIdInfo)
This method can only check for a sensitive permission.
permission - Indicates the permission to check for.nodeId - Indicates the network ID of the remote device. It cannot be null.appIdInfo - Indicates the application information. It is a JSON string that consists of
the application UID and PID, for example, "{\"uid\":10888,\"pid\":555}".0 if the application has the given permission;
returns -1 if the application does not have the given permission
or the permission to check for is a non-sensitive permission.@Deprecated public static int verifySelfPermissionFromRemote(String permission, String nodeId)
This method can only check for a sensitive permission.
permission - Indicates the permission to check for.nodeId - Indicates the network ID of the remote device. It cannot be null.0 if this application has the given permission;
returns -1 if this application does not have the given permission
or the permission to check for is a non-sensitive permission.