Sequenceablepublic class PermissionDef extends Object implements Sequenceable
def-permissions tag in the
ohos.profiles file.Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
int |
availableScope |
For what kind of application the permission restricts.if not set, no restricted scope for
permission applicants.
|
int |
descriptionRes |
A string resource identifier (in the package's resources) of this
permission's detailed description.
|
static int |
FLAG_DISCARDED |
Indicates that the permission is discarded.
|
int |
grantMode |
The mode of this permission is granted.it contains SYSTEM_GRANT and USER_GRANT.
|
String |
group |
Group to which this permission belongs.
|
int |
labelRes |
A string resource identifier (in the package's resources) of this
permission's brief description.
|
String |
name |
The name of this permission.
|
int |
permissionFlags |
The flag indicating whether the permission has been discarded.
|
static int |
PRIVILEGED |
Privileged-level value for
availableScope, only privileged
applications can use the permission. |
String |
reminderDesc |
A string resource identifier (in the package's resources) of this
permission's description of continuous reminder.
|
int |
reminderIcon |
A string resource identifier (in the package's resources) of this
permission's icon of continuous reminder.
|
static int |
RESTRICTED |
Restricted-level value for
availableScope, need to
apply to get this permission. |
static int |
SIGNATURE |
Signature-level value for
availableScope, the signature
of the user who defines the permission and the user must be the
same. |
static int |
SYSTEM |
System-level value for
availableScope, only be used by
system applications and modules, it needs to be declared in the profile. |
static int |
SYSTEM_GRANT |
Mode of grant permission, system grant mode.
|
int |
usageInfo |
A string resource identifier (in the package's resources) of this
permission's usage information.
|
static int |
USER_GRANT |
Mode of grant permission, user grant mode.
|
| 构造器 | 说明 |
|---|---|
PermissionDef() |
A constructor used to create a
PermissionDef instance. |
PermissionDef(PermissionDef orig) |
A constructor used to create a
PermissionDef instance using an existing
PermissionDef instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
marshalling(Parcel out) |
Marshals a
PermissionDef object into a Parcel object. |
boolean |
unmarshalling(Parcel in) |
Unmarshals a
PermissionDef object from a Parcel object. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic static final int FLAG_DISCARDED
public static final int PRIVILEGED
availableScope, only privileged
applications can use the permission.public static final int RESTRICTED
availableScope, need to
apply to get this permission.public static final int SIGNATURE
availableScope, the signature
of the user who defines the permission and the user must be the
same. after being declared in the profile, the authority management
module is responsible for the signature verification and consistency
before it can be used.public static final int SYSTEM
availableScope, only be used by
system applications and modules, it needs to be declared in the profile.public static final int SYSTEM_GRANT
public static final int USER_GRANT
public int availableScope
public int descriptionRes
public int grantMode
public String group
public int labelRes
public String name
public int permissionFlags
public String reminderDesc
public int reminderIcon
public int usageInfo
public PermissionDef()
PermissionDef instance.public PermissionDef(PermissionDef orig)
PermissionDef instance using an existing
PermissionDef instance.orig - Indicates the existing PermissionDef instance.public boolean marshalling(Parcel out)
PermissionDef object into a Parcel object.marshalling 在接口中 Sequenceableout - Indicates the Parcel object for marshalling.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
PermissionDef object from a Parcel object.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object for unmarshalling.true if the unmarshalling is successful; returns false otherwise.