# UnusedAppRestrictionsBackportCallback

# UnusedAppRestrictionsBackportCallback

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/content/UnusedAppRestrictionsBackportCallback.java+class:androidx.core.content.UnusedAppRestrictionsBackportCallback)  
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/UnusedAppRestrictionsBackportCallback "View this page in Java")

<br />

```
class UnusedAppRestrictionsBackportCallback
```

<br />

*** ** * ** ***

Wrapper class for {IUnusedAppRestrictionsBackportCallback}. Callback object to return the results from the[UnusedAppRestrictionsBackportService](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsBackportService)APIs.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onResult](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsBackportCallback#onResult(boolean,boolean))`(success: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`, enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` This will be called with the results of the[isPermissionRevocationEnabled](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsBackportService#isPermissionRevocationEnabled(androidx.core.content.UnusedAppRestrictionsBackportCallback))API. |

## Public functions

### onResult

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

```
fun onResult(success: Boolean, enabled: Boolean): Unit
```

This will be called with the results of the[isPermissionRevocationEnabled](https://developer.android.com/reference/kotlin/androidx/core/content/UnusedAppRestrictionsBackportService#isPermissionRevocationEnabled(androidx.core.content.UnusedAppRestrictionsBackportCallback))API.  

|                                           Parameters                                           |
|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| `success: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | false if there was an error while checking if the app is enabled, otherwise true. |
| `enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | true if permission revocation is enabled for the app, otherwise false.            |

|                                                Throws                                                 |
|-------------------------------------------------------------------------------------------------------|---|
| [android.os.RemoteException](https://developer.android.com/reference/android/os/RemoteException.html) |   |