# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Inherited Constants | Fields | Inherited Fields | Ctors | Methods | Inherited Methods

# PermissionInfo

`public class PermissionInfo`
`` `extends PackageItemInfo` `implements Parcelable`

java.lang.Object
↳ | android.content.pm.PackageItemInfo
| ↳ | android.content.pm.PermissionInfo

Information you can retrieve about a particular security permission known to the system. This corresponds to information collected from the AndroidManifest.xml's <permission> tags.

## Summary

### Constants
`int` | `FLAG_COSTS_MONEY` Flag for `flags`, corresponding to `costsMoney` value of `R.attr.permissionFlags`.
`int` | `FLAG_HARD_RESTRICTED` Flag for `flags`, corresponding to `hardRestricted` value of `R.attr.permissionFlags`.
`int` | `FLAG_IMMUTABLY_RESTRICTED` Flag for `flags`, corresponding to `immutablyRestricted` value of `R.attr.permissionFlags`.
`int` | `FLAG_INSTALLED` Flag for `flags`, indicating that this permission has been installed into the system's globally defined permissions.
`int` | `FLAG_SOFT_RESTRICTED` Flag for `flags`, corresponding to `softRestricted` value of `R.attr.permissionFlags`.
`int` | `PROTECTION_DANGEROUS` Dangerous value for `protectionLevel`, corresponding to the `dangerous` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_APPOP` Additional flag for `protectionLevel`, corresponding to the `appop` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_DEVELOPMENT` Additional flag for `protectionLevel`, corresponding to the `development` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_INSTALLER` Additional flag for `protectionLevel`, corresponding to the `installer` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_INSTANT` Additional flag for `protectionLevel`, corresponding to the `instant` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_PRE23` Additional flag for `protectionLevel`, corresponding to the `pre23` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_PREINSTALLED` Additional flag for `protectionLevel`, corresponding to the `preinstalled` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_PRIVILEGED` Additional flag for `protectionLevel`, corresponding to the `privileged` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_RUNTIME_ONLY` Additional flag for `protectionLevel`, corresponding to the `runtime` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_SETUP` Additional flag for `protectionLevel`, corresponding to the `setup` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_FLAG_SYSTEM` This constant is deprecated. Old name for `PROTECTION_FLAG_PRIVILEGED`, which is now very confusing because it only applies to privileged apps, not all apps on the system image.
`int` | `PROTECTION_FLAG_VERIFIER` Additional flag for `protectionLevel`, corresponding to the `verifier` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_INTERNAL` System-level value for `protectionLevel`, corresponding to the `internal` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_MASK_BASE` This constant is deprecated. Use #getProtection() instead.
`int` | `PROTECTION_MASK_FLAGS` This constant is deprecated. Use #getProtectionFlags() instead.
`int` | `PROTECTION_NORMAL` A normal application value for `protectionLevel`, corresponding to the `normal` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_SIGNATURE` System-level value for `protectionLevel`, corresponding to the `signature` value of `R.attr.protectionLevel`.
`int` | `PROTECTION_SIGNATURE_OR_SYSTEM` This constant is deprecated. Use `PROTECTION_SIGNATURE`|`PROTECTION_FLAG_PRIVILEGED` instead.

### Inherited constants
From interface `android.os.Parcelable`
`int` | `CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` | `PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `writeToParcel(Parcel, int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

### Fields
`public static final Creator<PermissionInfo>` | `CREATOR`
`public int` | `descriptionRes` A string resource identifier (in the package's resources) of this permission's description.
`public int` | `flags` Additional flags about this permission as given by `R.attr.permissionFlags`.
`public String` | `group` The group this permission is a part of, as per `R.attr.permissionGroup`.
`public CharSequence` | `nonLocalizedDescription` The description string provided in the AndroidManifest file, if any.
`public int` | `protectionLevel` This field is deprecated. Use #getProtection() and #getProtectionFlags() instead.

### Inherited fields
From class `android.content.pm.PackageItemInfo`
`public int` | `banner` A drawable resource identifier (in the package's resources) of this component's banner.
`public int` | `icon` A drawable resource identifier (in the package's resources) of this component's icon.
`public int` | `labelRes` A string resource identifier (in the package's resources) of this component's label.
`public int` | `logo` A drawable resource identifier (in the package's resources) of this component's logo.
`public Bundle` | `metaData` Additional meta-data associated with this component.
`public String` | `name` Public name of this item.
`public CharSequence` | `nonLocalizedLabel` The string provided in the AndroidManifest file, if any.
`public String` | `packageName` Name of the package that this item is in.

### Public constructors
`PermissionInfo()` This constructor is deprecated. Should only be created by the system.
`PermissionInfo(PermissionInfo orig)` This constructor is deprecated. Should only be created by the system.

### Public methods
`int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`int` | `getProtection()` Return the base permission type.
`int` | `getProtectionFlags()` Return the additional flags in `protectionLevel`.
`CharSequence` | `loadDescription(PackageManager pm)` Retrieve the textual description of this permission.
`String` | `toString()` Returns a string representation of the object.
`void` | `writeToParcel(Parcel dest, int parcelableFlags)`

### Inherited methods
From class `android.content.pm.PackageItemInfo`
`void` | `dumpBack(Printer pw, String prefix)`
`void` | `dumpFront(Printer pw, String prefix)`
`Drawable` | `loadBanner(PackageManager pm)` Retrieve the current graphical banner associated with this item.
`Drawable` | `loadIcon(PackageManager pm)` Retrieve the current graphical icon associated with this item.
`CharSequence` | `loadLabel(PackageManager pm)` Retrieve the current textual label associated with this item.
`Drawable` | `loadLogo(PackageManager pm)` Retrieve the current graphical logo associated with this item.
`Drawable` | `loadUnbadgedIcon(PackageManager pm)` Retrieve the current graphical icon associated with this item without the addition of a work badge if applicable.
`XmlResourceParser` | `loadXmlMetaData(PackageManager pm, String name)` Load an XML resource attached to the meta-data of this item.
`void` | `writeToParcel(Parcel dest, int parcelableFlags)`
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `android.os.Parcelable`
`abstract int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`abstract void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

## Constants

### FLAG_COSTS_MONEY

    public static final int FLAG_COSTS_MONEY

Flag for `flags`, corresponding to `costsMoney` value of `R.attr.permissionFlags`.

Constant Value: 1 (0x00000001)

### FLAG_HARD_RESTRICTED

    public static final int FLAG_HARD_RESTRICTED

Flag for `flags`, corresponding to `hardRestricted` value of `R.attr.permissionFlags`.

This permission is restricted by the platform and it would be grantable only to apps that meet special criteria per platform policy.

Constant Value: 4 (0x00000004)

### FLAG_IMMUTABLY_RESTRICTED

    public static final int FLAG_IMMUTABLY_RESTRICTED

Flag for `flags`, corresponding to `immutablyRestricted` value of `R.attr.permissionFlags`.

This permission is restricted immutably which means that its restriction state may be specified only on the first install of the app and will stay in this initial allowlist state until the app is uninstalled.

Constant Value: 16 (0x00000010)

### FLAG_INSTALLED

    public static final int FLAG_INSTALLED

Flag for `flags`, indicating that this permission has been installed into the system's globally defined permissions.

Constant Value: 1073741824 (0x40000000)

### FLAG_SOFT_RESTRICTED

    public static final int FLAG_SOFT_RESTRICTED

Flag for `flags`, corresponding to `softRestricted` value of `R.attr.permissionFlags`.

This permission is restricted by the platform and it would be grantable in its full form to apps that meet special criteria per platform policy. Otherwise, a weaker form of the permission would be granted. The weak grant depends on the permission.

Constant Value: 8 (0x00000008)

### PROTECTION_DANGEROUS

    public static final int PROTECTION_DANGEROUS

Dangerous value for `protectionLevel`, corresponding to the `dangerous` value of `R.attr.protectionLevel`.

Constant Value: 1 (0x00000001)

### PROTECTION_FLAG_APPOP

    public static final int PROTECTION_FLAG_APPOP

Additional flag for `protectionLevel`, corresponding to the `appop` value of `R.attr.protectionLevel`.

Constant Value: 64 (0x00000040)

### PROTECTION_FLAG_DEVELOPMENT

    public static final int PROTECTION_FLAG_DEVELOPMENT

Additional flag for `protectionLevel`, corresponding to the `development` value of `R.attr.protectionLevel`.

Constant Value: 32 (0x00000020)

### PROTECTION_FLAG_INSTALLER

    public static final int PROTECTION_FLAG_INSTALLER

Additional flag for `protectionLevel`, corresponding to the `installer` value of `R.attr.protectionLevel`.

Constant Value: 256 (0x00000100)

### PROTECTION_FLAG_INSTANT

    public static final int PROTECTION_FLAG_INSTANT

Additional flag for `protectionLevel`, corresponding to the `instant` value of `R.attr.protectionLevel`.

Constant Value: 4096 (0x00001000)

### PROTECTION_FLAG_PRE23

    public static final int PROTECTION_FLAG_PRE23

Additional flag for `protectionLevel`, corresponding to the `pre23` value of `R.attr.protectionLevel`.

Constant Value: 128 (0x00000080)

### PROTECTION_FLAG_PREINSTALLED

    public static final int PROTECTION_FLAG_PREINSTALLED

Additional flag for `protectionLevel`, corresponding to the `preinstalled` value of `R.attr.protectionLevel`.

Constant Value: 1024 (0x00000400)

### PROTECTION_FLAG_PRIVILEGED

    public static final int PROTECTION_FLAG_PRIVILEGED

Additional flag for `protectionLevel`, corresponding to the `privileged` value of `R.attr.protectionLevel`.

Constant Value: 16 (0x00000010)

### PROTECTION_FLAG_RUNTIME_ONLY

    public static final int PROTECTION_FLAG_RUNTIME_ONLY

Additional flag for `protectionLevel`, corresponding to the `runtime` value of `R.attr.protectionLevel`.

Constant Value: 8192 (0x00002000)

### PROTECTION_FLAG_SETUP

    public static final int PROTECTION_FLAG_SETUP

Additional flag for `protectionLevel`, corresponding to the `setup` value of `R.attr.protectionLevel`.

Constant Value: 2048 (0x00000800)

### PROTECTION_FLAG_SYSTEM

    public static final int PROTECTION_FLAG_SYSTEM

This constant is deprecated.
Old name for `PROTECTION_FLAG_PRIVILEGED`, which is now very confusing because it only applies to privileged apps, not all apps on the system image.

Constant Value: 16 (0x00000010)

### PROTECTION_FLAG_VERIFIER

    public static final int PROTECTION_FLAG_VERIFIER

Additional flag for `protectionLevel`, corresponding to the `verifier` value of `R.attr.protectionLevel`.

Constant Value: 512 (0x00000200)

### PROTECTION_INTERNAL

    public static final int PROTECTION_INTERNAL

System-level value for `protectionLevel`, corresponding to the `internal` value of `R.attr.protectionLevel`.

Constant Value: 4 (0x00000004)

### PROTECTION_MASK_BASE

    public static final int PROTECTION_MASK_BASE

This constant is deprecated.
Use #getProtection() instead.

Mask for `protectionLevel`: the basic protection type.

Constant Value: 15 (0x0000000f)

### PROTECTION_MASK_FLAGS

    public static final int PROTECTION_MASK_FLAGS

This constant is deprecated.
Use #getProtectionFlags() instead.

Mask for `protectionLevel`: additional flag bits.

Constant Value: 65520 (0x0000fff0)

### PROTECTION_NORMAL

    public static final int PROTECTION_NORMAL

A normal application value for `protectionLevel`, corresponding to the `normal` value of `R.attr.protectionLevel`.

Constant Value: 0 (0x00000000)

### PROTECTION_SIGNATURE

    public static final int PROTECTION_SIGNATURE

System-level value for `protectionLevel`, corresponding to the `signature` value of `R.attr.protectionLevel`.

Constant Value: 2 (0x00000002)

### PROTECTION_SIGNATURE_OR_SYSTEM

    public static final int PROTECTION_SIGNATURE_OR_SYSTEM

This constant is deprecated.
Use `PROTECTION_SIGNATURE`|`PROTECTION_FLAG_PRIVILEGED` instead.

Constant Value: 3 (0x00000003)

## Fields

### CREATOR

    public static final Creator<PermissionInfo> CREATOR

### descriptionRes

    public int descriptionRes

A string resource identifier (in the package's resources) of this permission's description. From the "description" attribute or, if not set, 0.

### flags

    public int flags

Additional flags about this permission as given by `R.attr.permissionFlags`.
Value is either `0` or a combination of `FLAG_COSTS_MONEY`, android.content.pm.PermissionInfo.FLAG_REMOVED, `FLAG_HARD_RESTRICTED`, `FLAG_SOFT_RESTRICTED`, `FLAG_IMMUTABLY_RESTRICTED`, and `FLAG_INSTALLED`

### group

    public String group

The group this permission is a part of, as per `R.attr.permissionGroup`.

### nonLocalizedDescription

    public CharSequence nonLocalizedDescription

The description string provided in the AndroidManifest file, if any. You probably don't want to use this, since it will be null if the description is in a resource. You probably want `PermissionInfo#loadDescription` instead.

### protectionLevel

    public int protectionLevel

This field is deprecated.
Use #getProtection() and #getProtectionFlags() instead.

The level of access this permission is protecting, as per `R.attr.protectionLevel`. Consists of a base permission type and zero or more flags. Use the following functions to extract them.

     int basePermissionType = permissionInfo.getProtection();
     int permissionFlags = permissionInfo.getProtectionFlags();

Base permission types are `PROTECTION_NORMAL`, `PROTECTION_DANGEROUS`, `PROTECTION_SIGNATURE`, `PROTECTION_INTERNAL` and the deprecated `PROTECTION_SIGNATURE_OR_SYSTEM`. Flags are listed under `R.attr.protectionLevel`.

## Public constructors

### PermissionInfo

    public PermissionInfo ()

This constructor is deprecated.
Should only be created by the system.

### PermissionInfo

    public PermissionInfo (PermissionInfo orig)

This constructor is deprecated.
Should only be created by the system.

Parameters
`orig` | `PermissionInfo`: This value cannot be `null`.

## Public methods

### describeContents

    public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `writeToParcel(android.os.Parcel, int)`, the return value of this method must include the `CONTENTS_FILE_DESCRIPTOR` bit.

Returns
`int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or `CONTENTS_FILE_DESCRIPTOR`

### getProtection

    public int getProtection ()

Return the base permission type.

Returns
`int` | Value is `PROTECTION_NORMAL`, `PROTECTION_DANGEROUS`, `PROTECTION_SIGNATURE`, `PROTECTION_SIGNATURE_OR_SYSTEM`, or `PROTECTION_INTERNAL`

### getProtectionFlags

    public int getProtectionFlags ()

Return the additional flags in `protectionLevel`.

Returns
`int` | Value is either `0` or a combination of `PROTECTION_FLAG_PRIVILEGED`, `PROTECTION_FLAG_SYSTEM`, `PROTECTION_FLAG_DEVELOPMENT`, `PROTECTION_FLAG_APPOP`, `PROTECTION_FLAG_PRE23`, `PROTECTION_FLAG_INSTALLER`, `PROTECTION_FLAG_VERIFIER`, `PROTECTION_FLAG_PREINSTALLED`, `PROTECTION_FLAG_SETUP`, `PROTECTION_FLAG_INSTANT`, `PROTECTION_FLAG_RUNTIME_ONLY`, android.content.pm.PermissionInfo.PROTECTION_FLAG_OEM, android.content.pm.PermissionInfo.PROTECTION_FLAG_VENDOR_PRIVILEGED, android.content.pm.PermissionInfo.PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER, android.content.pm.PermissionInfo.PROTECTION_FLAG_DOCUMENTER, android.content.pm.PermissionInfo.PROTECTION_FLAG_CONFIGURATOR, android.content.pm.PermissionInfo.PROTECTION_FLAG_INCIDENT_REPORT_APPROVER, android.content.pm.PermissionInfo.PROTECTION_FLAG_APP_PREDICTOR, android.content.pm.PermissionInfo.PROTECTION_FLAG_COMPANION, android.content.pm.PermissionInfo.PROTECTION_FLAG_RETAIL_DEMO, android.content.pm.PermissionInfo.PROTECTION_FLAG_RECENTS, android.content.pm.PermissionInfo.PROTECTION_FLAG_ROLE, and android.content.pm.PermissionInfo.PROTECTION_FLAG_KNOWN_SIGNER

### loadDescription

    public CharSequence loadDescription (PackageManager pm)

Retrieve the textual description of this permission. This will call back on the given PackageManager to load the description from the application.

Parameters
`pm` | `PackageManager`: A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item. This value cannot be `null`.

Returns
`CharSequence` | Returns a CharSequence containing the permission's description. If there is no description, null is returned.

### toString

    public String toString ()

Returns a string representation of the object. In general, the `toString` method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The `toString` method for class `Object` returns a string consisting of the name of the class of which the object is an instance, the at-sign character ``@`', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

>      getClass().getName() + '@' + Integer.toHexString(hashCode())

Returns
`String` | a string representation of the object.

### writeToParcel

    public void writeToParcel (Parcel dest,
                    int parcelableFlags)

Parameters
`dest` | `Parcel`
`parcelableFlags` | `int`

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*