Class ProtectionLevel
- java.lang.Object
-
- com.ensoftcorp.open.android.essentials.permissions.ProtectionLevel
-
public class ProtectionLevel extends java.lang.Object
An convenience object that encodes Android Protection Level property values- Author:
- Ben Holland, Vani Bojja
-
-
Field Summary
Fields Modifier and Type Field Description static ProtectionLevel
APPOP
static ProtectionLevel
DANGEROUS
static ProtectionLevel
DEVELOPMENT
static ProtectionLevel
NORMAL
static java.util.Date
REFERENCE_DATE
static java.lang.String[]
REFERENCE_SOURCES
static ProtectionLevel
SIGNATURE
static ProtectionLevel
SIGNATURE_OR_SYSTEM
static ProtectionLevel
SYSTEM
static ProtectionLevel
UNASSIGNED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Collection<ProtectionLevel>
getAllProtectionLevels()
Returns a collection of all known protection levelsjava.lang.String
getDescription()
Returns a description of the protection levelint
getLevel()
Returns the protection level integer as defined in the Android sourcejava.lang.String
getName()
Returns the protection level namejava.util.HashSet<Permission>
getPermissions()
Returns a list of permissions associated with the protection leveljava.lang.String
toString()
-
-
-
Field Detail
-
REFERENCE_SOURCES
public static java.lang.String[] REFERENCE_SOURCES
-
REFERENCE_DATE
public static java.util.Date REFERENCE_DATE
-
NORMAL
public static final ProtectionLevel NORMAL
-
DANGEROUS
public static final ProtectionLevel DANGEROUS
-
SIGNATURE
public static final ProtectionLevel SIGNATURE
-
SIGNATURE_OR_SYSTEM
public static final ProtectionLevel SIGNATURE_OR_SYSTEM
-
SYSTEM
public static final ProtectionLevel SYSTEM
-
DEVELOPMENT
public static final ProtectionLevel DEVELOPMENT
-
APPOP
public static final ProtectionLevel APPOP
-
UNASSIGNED
public static final ProtectionLevel UNASSIGNED
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the protection level name- Returns:
-
getLevel
public int getLevel()
Returns the protection level integer as defined in the Android source- Returns:
-
getDescription
public java.lang.String getDescription()
Returns a description of the protection level- Returns:
-
getPermissions
public java.util.HashSet<Permission> getPermissions()
Returns a list of permissions associated with the protection level- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAllProtectionLevels
public static java.util.Collection<ProtectionLevel> getAllProtectionLevels()
Returns a collection of all known protection levels
-
-