Struct android_manifest::PermissionTree
source · pub struct PermissionTree {
pub icon: Option<MipmapOrDrawableResource>,
pub label: Option<StringResourceOrString>,
pub name: Option<String>,
}
Expand description
Declares the base name for a tree of permissions.
The application takes ownership of all names within the tree. It can dynamically add
new permissions to the tree by calling PackageManager.addPermission()
Names within
the tree are separated by periods ('.')
. For example, if the base name is
com.example.project.taxes.
Permissions like the following might be added:
com.example.project.taxes.CALCULATE
com.example.project.taxes.deductions.MAKE_SOME_UP
com.example.project.taxes.deductions.EXAGGERATE
Note that this element does not declare a permission itself, only a
namespace in which further permissions can be placed. See the <permission>
element for information on declaring permissions.
XML Syntax
<permission-tree android:icon="drawable resource"
android:label="string resource" ]
android:name="string" />
Contained in
Introduced in
API Level 1
Fields§
§icon: Option<MipmapOrDrawableResource>
An icon representing all the permissions in the tree. This attribute must be set as a reference to a drawable resource containing the image definition.
label: Option<StringResourceOrString>
A user-readable name for the group. As a convenience, the label can be directly set as a raw string for quick and dirty programming. However, when the application is ready to be published, it should be set as a reference to a string resource, so that it can be localized like other strings in the user interface.
name: Option<String>
The name that’s at the base of the permission tree. It serves as a prefix to all
permission names in the tree. Java-style scoping should be used to ensure that
the name is unique. The name must have more than two period-separated segments
in its path — for example, com.example.base
is OK, but com.example
is not.
Trait Implementations§
source§impl Clone for PermissionTree
impl Clone for PermissionTree
source§fn clone(&self) -> PermissionTree
fn clone(&self) -> PermissionTree
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PermissionTree
impl Debug for PermissionTree
source§impl Default for PermissionTree
impl Default for PermissionTree
source§fn default() -> PermissionTree
fn default() -> PermissionTree
source§impl<'de> Deserialize<'de> for PermissionTree
impl<'de> Deserialize<'de> for PermissionTree
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl PartialEq<PermissionTree> for PermissionTree
impl PartialEq<PermissionTree> for PermissionTree
source§fn eq(&self, other: &PermissionTree) -> bool
fn eq(&self, other: &PermissionTree) -> bool
self
and other
values to be equal, and is used
by ==
.