pub enum ProtectionLevel {
Normal,
Dangerous,
Signature,
SignatureOrSystem,
}
Expand description
The following table shows all base permission types. For a list of flags,
see protectionLevel
.
Variants§
Normal
The default value. A lower-risk permission that gives requesting applications access to isolated application-level features, with minimal risk to other applications, the system, or the user. The system automatically grants this type of permission to a requesting application at installation, without asking for the user’s explicit approval (though the user always has the option to review these permissions before installing).
Dangerous
A higher-risk permission that would give a requesting application access to private user data or control over the device that can negatively impact the user. Because this type of permission introduces potential risk, the system may not automatically grant it to the requesting application. For example, any dangerous permissions requested by an application may be displayed to the user and require confirmation before proceeding, or some other approach may be taken to avoid the user automatically allowing the use of such facilities.
Signature
A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user’s explicit approval.
SignatureOrSystem
Old synonym for "signature|privileged"
. Deprecated in API level 23. A permission
that the system grants only to applications that are in a dedicated folder on
the Android system image or that are signed with the same certificate as the
application that declared the permission. Avoid using this option, as the
signature protection level should be sufficient for most needs and works
regardless of exactly where apps are installed.
The “signatureOrSystem” permission is used for certain special
situations where multiple vendors have applications
built into a system image and need to share specific features
explicitly because they are being built together.
Trait Implementations§
source§impl Clone for ProtectionLevel
impl Clone for ProtectionLevel
source§fn clone(&self) -> ProtectionLevel
fn clone(&self) -> ProtectionLevel
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProtectionLevel
impl Debug for ProtectionLevel
source§impl Default for ProtectionLevel
impl Default for ProtectionLevel
source§fn default() -> ProtectionLevel
fn default() -> ProtectionLevel
source§impl<'de> Deserialize<'de> for ProtectionLevel
impl<'de> Deserialize<'de> for ProtectionLevel
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<ProtectionLevel> for ProtectionLevel
impl PartialEq<ProtectionLevel> for ProtectionLevel
source§fn eq(&self, other: &ProtectionLevel) -> bool
fn eq(&self, other: &ProtectionLevel) -> bool
self
and other
values to be equal, and is used
by ==
.