# UnusedAppRestrictionsConstants

# UnusedAppRestrictionsConstants

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/content/UnusedAppRestrictionsConstants "View this page in Java")

<br />

```
class UnusedAppRestrictionsConstants
```

<br />

*** ** * ** ***

Shared constants related to Unused App Restrictions (e.g. Permission Revocation, App Hibernation).

## Summary

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [API_30](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsConstants#API_30())` = 4` Unused App Restrictions introduced by Android API 30 are enabled for this app:[permission auto-reset](https://developer.android.com/training/permissions/requesting#auto-reset-permissions-unused-apps).                                                                                                          |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [API_30_BACKPORT](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsConstants#API_30_BACKPORT())` = 3` Unused App Restrictions introduced by Android API 30, and since made available on earlier (API 23-29) devices are enabled for this app:[permission auto-reset](https://developer.android.com/training/permissions/requesting#auto-reset-permissions-unused-apps).                               |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [API_31](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsConstants#API_31())` = 5` Unused App Restrictions introduced by Android API 31 are enabled for this app:[permission auto-reset](https://developer.android.com/training/permissions/requesting#auto-reset-permissions-unused-apps)and[app hibernation](https://developer.android.com/about/versions/12/behavior-changes-12#app-hibernation). |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [DISABLED](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsConstants#DISABLED())` = 2` Any available Unused App Restrictions on the device are disabled for this app.                                                                                                                                                                                                                                |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [ERROR](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsConstants#ERROR())` = 0` The status of Unused App Restrictions could not be retrieved from this app.                                                                                                                                                                                                                                         |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FEATURE_NOT_AVAILABLE](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsConstants#FEATURE_NOT_AVAILABLE())` = 1` There are no available Unused App Restrictions for this app.                                                                                                                                                                                                                        |

## Constants

### API_30

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

```
const val API_30 = 4: Int
```

Unused App Restrictions introduced by Android API 30 are enabled for this app:[permission auto-reset](https://developer.android.com/training/permissions/requesting#auto-reset-permissions-unused-apps). Note: This value is only used on API 30 or later devices.  

### API_30_BACKPORT

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

```
const val API_30_BACKPORT = 3: Int
```

Unused App Restrictions introduced by Android API 30, and since made available on earlier (API 23-29) devices are enabled for this app:[permission auto-reset](https://developer.android.com/training/permissions/requesting#auto-reset-permissions-unused-apps). Note: This value is only used on API 29 or earlier devices.  

### API_31

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

```
const val API_31 = 5: Int
```

Unused App Restrictions introduced by Android API 31 are enabled for this app:[permission auto-reset](https://developer.android.com/training/permissions/requesting#auto-reset-permissions-unused-apps)and[app hibernation](https://developer.android.com/about/versions/12/behavior-changes-12#app-hibernation). Note: This value is only used on API 31 or later devices.  

### DISABLED

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

```
const val DISABLED = 2: Int
```

Any available Unused App Restrictions on the device are disabled for this app. In other words, this app is exempt from having its permissions automatically removed or being hibernated.  

### ERROR

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

```
const val ERROR = 0: Int
```

The status of Unused App Restrictions could not be retrieved from this app. Note: check the logs for the reason (e.g. if the app's target SDK version \<30 or the user is in locked device boot mode).  

### FEATURE_NOT_AVAILABLE

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

```
const val FEATURE_NOT_AVAILABLE = 1: Int
```

There are no available Unused App Restrictions for this app.