Stay organized with collections
Save and categorize content based on your preferences.
FrozenStateChangeCallback
interface FrozenStateChangeCallback
A callback interface for receiving frozen state change events.
Summary
Constants |
static Int |
Represents the frozen state of the remote process.
|
static Int |
Represents the unfrozen state of the remote process.
|
Public methods |
abstract Unit |
Interface for receiving a callback when the process hosting an IBinder has changed its frozen state.
|
Constants
STATE_FROZEN
static val STATE_FROZEN: Int
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.
Value: 0
STATE_UNFROZEN
static val STATE_UNFROZEN: Int
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.
Value: 1
Public methods
onFrozenStateChanged
abstract fun onFrozenStateChanged(
who: IBinder,
state: Int
): Unit
Interface for receiving a callback when the process hosting an IBinder has changed its frozen state.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[null,null,["Last updated 2025-03-13 UTC."],[],[],null,["# IBinder.FrozenStateChangeCallback\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFrozenStateChangeCallback\n=========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/IBinder.FrozenStateChangeCallback \"View this page in Java\") \n\n```\ninterface FrozenStateChangeCallback\n```\n\n|---------------------------------------------------|\n| [android.os.IBinder.FrozenStateChangeCallback](#) |\n\nA callback interface for receiving frozen state change events.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [STATE_FROZEN](#STATE_FROZEN:kotlin.Int) Represents the frozen state of the remote process. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [STATE_UNFROZEN](#STATE_UNFROZEN:kotlin.Int) Represents the unfrozen state of the remote process. |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onFrozenStateChanged](#onFrozenStateChanged(android.os.IBinder,%20kotlin.Int))`(`who:` `[IBinder](/reference/kotlin/android/os/IBinder)`, `state:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Interface for receiving a callback when the process hosting an IBinder has changed its frozen state. |\n\nConstants\n---------\n\n### STATE_FROZEN\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val STATE_FROZEN: Int\n```\n\nRepresents 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. \n\n Value: 0\n\n### STATE_UNFROZEN\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val STATE_UNFROZEN: Int\n```\n\nRepresents 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. \n\n Value: 1\n\nPublic methods\n--------------\n\n### onFrozenStateChanged\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onFrozenStateChanged(\n who: IBinder, \n state: Int\n): Unit\n```\n\nInterface for receiving a callback when the process hosting an IBinder has changed its frozen state.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `who` | [IBinder](/reference/kotlin/android/os/IBinder): The IBinder whose hosting process has changed state. This value cannot be `null`. |\n| `state` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The latest state. Value is [android.os.IBinder.FrozenStateChangeCallback#STATE_FROZEN](#STATE_FROZEN:kotlin.Int), or [android.os.IBinder.FrozenStateChangeCallback#STATE_UNFROZEN](#STATE_UNFROZEN:kotlin.Int) |"]]