Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/content/pm/PermissionInfo#constants) \| [Inherited Constants](https://developer.android.com/reference/android/content/pm/PermissionInfo#inhconstants) \| [Fields](https://developer.android.com/reference/android/content/pm/PermissionInfo#lfields) \| [Inherited Fields](https://developer.android.com/reference/android/content/pm/PermissionInfo#inhfields) \| [Ctors](https://developer.android.com/reference/android/content/pm/PermissionInfo#pubctors) \| [Methods](https://developer.android.com/reference/android/content/pm/PermissionInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/content/pm/PermissionInfo#inhmethods)

# PermissionInfo

*** ** * ** ***

` public class PermissionInfo `   
` ` ` extends https://developer.android.com/reference/android/content/pm/PackageItemInfo ` ` implements https://developer.android.com/reference/android/os/Parcelable `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.content.pm.PackageItemInfo](https://developer.android.com/reference/android/content/pm/PackageItemInfo) ||
|   | ↳ | android.content.pm.PermissionInfo |

<br />

*** ** * ** ***

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` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_ALLOWED_IN_PRIVATE_COMPUTE_CORE` Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `allowedInPrivateComputeCore` Determines whether this permission can be obtained by components running in the Private Compute Core restricted environment. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_COSTS_MONEY` Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `costsMoney` value of `https://developer.android.com/reference/android/R.attr#permissionFlags`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_HARD_RESTRICTED` Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `hardRestricted` value of `https://developer.android.com/reference/android/R.attr#permissionFlags`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_IMMUTABLY_RESTRICTED` Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `immutablyRestricted` value of `https://developer.android.com/reference/android/R.attr#permissionFlags`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_INSTALLED` Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, indicating that this permission has been installed into the system's globally defined permissions. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_SOFT_RESTRICTED` Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `softRestricted` value of `https://developer.android.com/reference/android/R.attr#permissionFlags`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_DANGEROUS` Dangerous value for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `dangerous` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_APPOP` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `appop` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_DEVELOPMENT` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `development` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_INSTALLER` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `installer` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_INSTANT` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `instant` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PRE23` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `pre23` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PREINSTALLED` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `preinstalled` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PRIVILEGED` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `privileged` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_RUNTIME_ONLY` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `runtime` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_SETUP` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `setup` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_SYSTEM` *This constant was deprecated in API level 23. Old name for `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PRIVILEGED`, which is now very confusing because it only applies to privileged apps, not all apps on the system image.* |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_VERIFIER` Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `verifier` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_INTERNAL` System-level value for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `internal` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_MASK_BASE` *This constant was deprecated in API level 28. Use #getProtection() instead.* |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_MASK_FLAGS` *This constant was deprecated in API level 28. Use #getProtectionFlags() instead.* |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_NORMAL` A normal application value for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `normal` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_SIGNATURE` System-level value for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `signature` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`. |
| `int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_SIGNATURE_OR_SYSTEM` *This constant was deprecated in API level 23. Use `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_SIGNATURE`\|`https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PRIVILEGED` instead.* |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: 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 https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/content/pm/PermissionInfo>` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#CREATOR` <br /> |
| ` public int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#descriptionRes` A string resource identifier (in the package's resources) of this permission's description. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags` Additional flags about this permission as given by `https://developer.android.com/reference/android/R.attr#permissionFlags`. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#group` The group this permission is a part of, as per `https://developer.android.com/reference/android/R.attr#permissionGroup`. |
| ` public https://developer.android.com/reference/java/lang/CharSequence` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#nonLocalizedDescription` The description string provided in the AndroidManifest file, if any. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel` *This field was deprecated in API level 28. Use #getProtection() and #getProtectionFlags() instead.* |

### Inherited fields

From class `https://developer.android.com/reference/android/content/pm/PackageItemInfo` ` public int` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#banner`

A drawable resource identifier (in the package's resources) of this component's banner.
` public int` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#icon`

A drawable resource identifier (in the package's resources) of this component's icon.
` public boolean` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#isArchived`

Whether the package is currently in an archived state.
` public int` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#labelRes`

A string resource identifier (in the package's resources) of this component's label.
` public int` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#logo`

A drawable resource identifier (in the package's resources) of this component's logo.
` public https://developer.android.com/reference/android/os/Bundle` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#metaData`

Additional meta-data associated with this component.
` public https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#name`

Public name of this item.
` public https://developer.android.com/reference/java/lang/CharSequence` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#nonLocalizedLabel`

The string provided in the AndroidManifest file, if any.
` public https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/content/pm/PackageItemInfo#packageName`

Name of the package that this item is in.

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/content/pm/PermissionInfo#PermissionInfo()() ` *This constructor is deprecated. Should only be created by the system.* |
| ` https://developer.android.com/reference/android/content/pm/PermissionInfo#PermissionInfo(android.content.pm.PermissionInfo)(https://developer.android.com/reference/android/content/pm/PermissionInfo orig) ` *This constructor is deprecated. Should only be created by the system.* |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/content/pm/PermissionInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` int` | ` https://developer.android.com/reference/android/content/pm/PermissionInfo#getProtection()() ` Return the base permission type. |
| ` int` | ` https://developer.android.com/reference/android/content/pm/PermissionInfo#getProtectionFlags()() ` Return the additional flags in `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/content/pm/PermissionInfo#loadDescription(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Retrieve the textual description of this permission. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/pm/PermissionInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/content/pm/PermissionInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int parcelableFlags) ` <br /> |

### Inherited methods

From class ` https://developer.android.com/reference/android/content/pm/PackageItemInfo ` ` void` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#dumpBack(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` ` void` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#dumpFront(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` ` https://developer.android.com/reference/android/graphics/drawable/Drawable` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadBanner(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current graphical banner associated with this item.
` https://developer.android.com/reference/android/graphics/drawable/Drawable` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current graphical icon associated with this item.
` https://developer.android.com/reference/java/lang/CharSequence` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadLabel(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current textual label associated with this item.
` https://developer.android.com/reference/android/graphics/drawable/Drawable` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadLogo(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current graphical logo associated with this item.
` https://developer.android.com/reference/android/graphics/drawable/Drawable` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadUnbadgedIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) `

Retrieve the current graphical icon associated with this item without the addition of a work badge if applicable.
` https://developer.android.com/reference/android/content/res/XmlResourceParser` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadXmlMetaData(android.content.pm.PackageManager,%20java.lang.String)(https://developer.android.com/reference/android/content/pm/PackageManager pm, https://developer.android.com/reference/java/lang/String name) `

Load an XML resource attached to the meta-data of this item.
` void` ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int parcelableFlags) ` From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.
From interface ` https://developer.android.com/reference/android/os/Parcelable ` ` abstract int` ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() `

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
` abstract void` ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) `

Flatten this object in to a Parcel.

## Constants

### FLAG_ALLOWED_IN_PRIVATE_COMPUTE_CORE

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_ALLOWED_IN_PRIVATE_COMPUTE_CORE
```

Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `allowedInPrivateComputeCore` Determines whether this permission can be obtained by components running in the Private Compute Core restricted environment.

<br />

Constant Value: 32 (0x00000020)

### FLAG_COSTS_MONEY

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_COSTS_MONEY
```

Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `costsMoney` value of `https://developer.android.com/reference/android/R.attr#permissionFlags`.

<br />

Constant Value: 1 (0x00000001)

### FLAG_HARD_RESTRICTED

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_HARD_RESTRICTED
```

Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `hardRestricted` value of `https://developer.android.com/reference/android/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.

<br />

Constant Value: 4 (0x00000004)

### FLAG_IMMUTABLY_RESTRICTED

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_IMMUTABLY_RESTRICTED
```

Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `immutablyRestricted` value of `https://developer.android.com/reference/android/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.

<br />

Constant Value: 16 (0x00000010)

### FLAG_INSTALLED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_INSTALLED
```

Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, indicating that this permission has been installed into the system's globally defined permissions.

<br />

Constant Value: 1073741824 (0x40000000)

### FLAG_SOFT_RESTRICTED

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SOFT_RESTRICTED
```

Flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#flags`, corresponding to `softRestricted` value of `https://developer.android.com/reference/android/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.

<br />

Constant Value: 8 (0x00000008)

### PROTECTION_DANGEROUS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_DANGEROUS
```

Dangerous value for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `dangerous` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 1 (0x00000001)

### PROTECTION_FLAG_APPOP

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_APPOP
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `appop` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 64 (0x00000040)

### PROTECTION_FLAG_DEVELOPMENT

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_DEVELOPMENT
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `development` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 32 (0x00000020)

### PROTECTION_FLAG_INSTALLER

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_INSTALLER
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `installer` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 256 (0x00000100)

### PROTECTION_FLAG_INSTANT

Added in [API level 27](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_INSTANT
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `instant` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 4096 (0x00001000)

### PROTECTION_FLAG_PRE23

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_PRE23
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `pre23` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 128 (0x00000080)

### PROTECTION_FLAG_PREINSTALLED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_PREINSTALLED
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `preinstalled` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 1024 (0x00000400)

### PROTECTION_FLAG_PRIVILEGED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_PRIVILEGED
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `privileged` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 16 (0x00000010)

### PROTECTION_FLAG_RUNTIME_ONLY

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_RUNTIME_ONLY
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `runtime` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 8192 (0x00002000)

### PROTECTION_FLAG_SETUP

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_SETUP
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `setup` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 2048 (0x00000800)

### PROTECTION_FLAG_SYSTEM

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_SYSTEM
```

<br />

**This constant was deprecated in API level 23.**   

Old name for `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PRIVILEGED`, which is now very confusing because it only applies to privileged apps, not all apps on the system image.

<br />

<br />

Constant Value: 16 (0x00000010)

### PROTECTION_FLAG_VERIFIER

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_FLAG_VERIFIER
```

Additional flag for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `verifier` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 512 (0x00000200)

### PROTECTION_INTERNAL

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_INTERNAL
```

System-level value for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `internal` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 4 (0x00000004)

### PROTECTION_MASK_BASE

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_MASK_BASE
```

<br />

**This constant was deprecated in API level 28.**   

Use #getProtection() instead.

Mask for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`: the basic protection type.

<br />

Constant Value: 15 (0x0000000f)

### PROTECTION_MASK_FLAGS

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_MASK_FLAGS
```

<br />

**This constant was deprecated in API level 28.**   

Use #getProtectionFlags() instead.

Mask for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`: additional flag bits.

<br />

Constant Value: 65520 (0x0000fff0)

### PROTECTION_NORMAL

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_NORMAL
```

A normal application value for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `normal` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 0 (0x00000000)

### PROTECTION_SIGNATURE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_SIGNATURE
```

System-level value for `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`, corresponding to the `signature` value of `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

Constant Value: 2 (0x00000002)

### PROTECTION_SIGNATURE_OR_SYSTEM

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROTECTION_SIGNATURE_OR_SYSTEM
```

<br />

**This constant was deprecated in API level 23.**   

Use `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_SIGNATURE`\|`https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PRIVILEGED` instead.

<br />

<br />

Constant Value: 3 (0x00000003)

## Fields

### CREATOR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<PermissionInfo> CREATOR
```

<br />

<br />

### descriptionRes

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

### flags

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int flags
```

Additional flags about this permission as given by `https://developer.android.com/reference/android/R.attr#permissionFlags`.   

Value is either `0` or a combination of the following:

- `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_COSTS_MONEY`
- `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_HARD_RESTRICTED`
- `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_SOFT_RESTRICTED`
- `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_IMMUTABLY_RESTRICTED`
- `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_ALLOWED_IN_PRIVATE_COMPUTE_CORE`
- `https://developer.android.com/reference/android/content/pm/PermissionInfo#FLAG_INSTALLED`

### group

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String group
```

The group this permission is a part of, as per `https://developer.android.com/reference/android/R.attr#permissionGroup`.

The actual grouping of platform-defined runtime permissions is subject to change and can be queried with `https://developer.android.com/reference/android/content/pm/PackageManager#getGroupOfPlatformPermission(java.lang.String,%20java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.String>)`.

<br />

### nonLocalizedDescription

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 `https://developer.android.com/reference/android/content/pm/PermissionInfo#loadDescription(android.content.pm.PackageManager)` instead.

<br />

### protectionLevel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int protectionLevel
```

<br />

**This field was deprecated in API level 28.**   

Use #getProtection() and #getProtectionFlags() instead.

The level of access this permission is protecting, as per `https://developer.android.com/reference/android/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();
```

<br />

Base permission types are `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_NORMAL`, `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_DANGEROUS`, `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_SIGNATURE`, `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_INTERNAL` and the deprecated `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_SIGNATURE_OR_SYSTEM`. Flags are listed under `https://developer.android.com/reference/android/R.attr#protectionLevel`.

<br />

<br />

## Public constructors

### PermissionInfo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PermissionInfo ()
```

<br />

**This constructor is deprecated.**   

Should only be created by the system.

<br />

<br />

### PermissionInfo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PermissionInfo (PermissionInfo orig)
```

<br />

**This constructor is deprecated.**   

Should only be created by the system.

<br />

<br />

| Parameters ||
|---|---|
| `orig` | `PermissionInfo`: This value cannot be `null`. <br /> |

## Public methods

### describeContents

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`, the return value of this method must include the `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### getProtection

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getProtection ()
```

Return the base permission type.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_NORMAL` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_DANGEROUS` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_SIGNATURE` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_SIGNATURE_OR_SYSTEM` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_INTERNAL` |

### getProtectionFlags

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getProtectionFlags ()
```

Return the additional flags in `https://developer.android.com/reference/android/content/pm/PermissionInfo#protectionLevel`.

<br />

| Returns ||
|---|---|
| `int` | Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PRIVILEGED` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_SYSTEM` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_DEVELOPMENT` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_APPOP` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PRE23` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_INSTALLER` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_VERIFIER` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_PREINSTALLED` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_SETUP` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_INSTANT` - `https://developer.android.com/reference/android/content/pm/PermissionInfo#PROTECTION_FLAG_RUNTIME_ONLY` |

### loadDescription

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

| 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`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | Returns a CharSequence containing the permission's description. If there is no description, null is returned. <br /> |

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int parcelableFlags)
```

<br />

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel` <br /> |
| `parcelableFlags` | `int` <br /> |