# IBinder.FrozenStateChangeCallback

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

# IBinder.FrozenStateChangeCallback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/os/IBinder.FrozenStateChangeCallback "View this page in Kotlin")\|Java

`
public
static


interface
IBinder.FrozenStateChangeCallback
`  
`


`

|----------------------------------------------|
| android.os.IBinder.FrozenStateChangeCallback |

<br />

*** ** * ** ***

A callback interface for receiving frozen state change events.

## Summary

|                                                                                   ### Constants                                                                                   ||
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [STATE_FROZEN](https://developer.android.com/reference/android/os/IBinder.FrozenStateChangeCallback#STATE_FROZEN) Represents the frozen state of the remote process.       |
| `int` | [STATE_UNFROZEN](https://developer.android.com/reference/android/os/IBinder.FrozenStateChangeCallback#STATE_UNFROZEN) Represents the unfrozen state of the remote process. |

|                                                                                                                                                                                ### Public methods                                                                                                                                                                                 ||
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[onFrozenStateChanged](https://developer.android.com/reference/android/os/IBinder.FrozenStateChangeCallback#onFrozenStateChanged(android.os.IBinder,%20int))`(`[IBinder](https://developer.android.com/reference/android/os/IBinder)` who, int state) ` Interface for receiving a callback when the process hosting an IBinder has changed its frozen state. |

## Constants

### STATE_FROZEN

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

```
public static final int STATE_FROZEN
```

Represents the frozen state of the remote process. While in this state, the remote process won't be able to receive and handle a transaction. Therefore, any asynchronous transactions will be buffered and delivered when the process is unfrozen, and any synchronous transactions will result in an error. Buffered transactions may be stale by the time that the process is unfrozen and handles them. To avoid overwhelming the remote process with stale events or overflowing their buffers, it's best to avoid sending binder transactions to a frozen process.

<br />

Constant Value: 0 (0x00000000)  

### STATE_UNFROZEN

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

```
public static final int STATE_UNFROZEN
```

Represents the unfrozen state of the remote process. In this state, the process hosting the object can execute and is not restricted by the freezer from using the CPU or responding to binder transactions.

<br />

Constant Value: 1 (0x00000001)

## Public methods

### onFrozenStateChanged

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

```
public abstract void onFrozenStateChanged (IBinder who, 
                int state)
```

Interface for receiving a callback when the process hosting an IBinder has changed its frozen state.

<br />

|                                                                                                                                         Parameters                                                                                                                                          ||
|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `who`   | `IBinder`: The IBinder whose hosting process has changed state. This value cannot be`null`. <br />                                                                                                                                                                                 |
| `state` | `int`: The latest state. Value is[STATE_FROZEN](https://developer.android.com/reference/android/os/IBinder.FrozenStateChangeCallback#STATE_FROZEN), or[STATE_UNFROZEN](https://developer.android.com/reference/android/os/IBinder.FrozenStateChangeCallback#STATE_UNFROZEN) <br /> |