# PermissionInfoCompat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/content/pm/PermissionInfoCompat.java+class:androidx.core.content.pm.PermissionInfoCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
class PermissionInfoCompat
```

<br />

*** ** * ** ***

Helper for accessing features in `https://developer.android.com/reference/android/content/pm/PermissionInfo.html`.

## Summary

| ### Public functions |
|---|---|
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/content/pm/PermissionInfoCompat#getProtection(android.content.pm.PermissionInfo)(permissionInfo: https://developer.android.com/reference/android/content/pm/PermissionInfo.html)` Return the base permission type of a `https://developer.android.com/reference/android/content/pm/PermissionInfo.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/content/pm/PermissionInfoCompat#getProtectionFlags(android.content.pm.PermissionInfo)(permissionInfo: https://developer.android.com/reference/android/content/pm/PermissionInfo.html)` Return the additional protection flags of a `https://developer.android.com/reference/android/content/pm/PermissionInfo.html`. |

## Public functions

### getProtection

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
java-static fun getProtection(permissionInfo: PermissionInfo): Int
```

Return the base permission type of a `https://developer.android.com/reference/android/content/pm/PermissionInfo.html`.

Value is one of the following:

- `PermissionInfo.PROTECTION_NORMAL`
- `PermissionInfo.PROTECTION_DANGEROUS`
- `PermissionInfo.PROTECTION_SIGNATURE`
- `PermissionInfo.PROTECTION_SIGNATURE_OR_SYSTEM`

<br />

### getProtectionFlags

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
java-static fun getProtectionFlags(permissionInfo: PermissionInfo): Int
```

Return the additional protection flags of a `https://developer.android.com/reference/android/content/pm/PermissionInfo.html`.

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

- `PermissionInfo.PROTECTION_FLAG_PRIVILEGED`
- `PermissionInfo.PROTECTION_FLAG_SYSTEM`
- `PermissionInfo.PROTECTION_FLAG_DEVELOPMENT`
- `PermissionInfo.PROTECTION_FLAG_APPOP`
- `PermissionInfo.PROTECTION_FLAG_PRE23`
- `PermissionInfo.PROTECTION_FLAG_INSTALLER`
- `PermissionInfo.PROTECTION_FLAG_VERIFIER`
- `PermissionInfo.PROTECTION_FLAG_PREINSTALLED`
- `PermissionInfo.PROTECTION_FLAG_SETUP`
- `PermissionInfo.PROTECTION_FLAG_INSTANT`
- `PermissionInfo.PROTECTION_FLAG_RUNTIME_ONLY`

<br />