Stay organized with collections
Save and categorize content based on your preferences.
IBinder.FrozenStateChangeCallback
public
static
interface
IBinder.FrozenStateChangeCallback
android.os.IBinder.FrozenStateChangeCallback
|
A callback interface for receiving frozen state change events.
Summary
Constants |
int |
STATE_FROZEN
Represents the frozen state of the remote process.
|
int |
STATE_UNFROZEN
Represents the unfrozen state of the remote process.
|
Public methods |
abstract
void
|
onFrozenStateChanged(IBinder who, int state)
Interface for receiving a callback when the process hosting an IBinder
has changed its frozen state.
|
Constants
STATE_FROZEN
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.
Constant Value:
0
(0x00000000)
STATE_UNFROZEN
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.
Constant Value:
1
(0x00000001)
Public methods
onFrozenStateChanged
public abstract void onFrozenStateChanged (IBinder who,
int state)
Interface for receiving a callback when the process hosting an IBinder
has changed its frozen state.
Parameters |
who |
IBinder : The IBinder whose hosting process has changed state.
This value cannot be null . |
state |
int : The latest state.
Value is STATE_FROZEN , or STATE_UNFROZEN |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# IBinder.FrozenStateChangeCallback\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nIBinder.FrozenStateChangeCallback\n=================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/os/IBinder.FrozenStateChangeCallback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nIBinder.FrozenStateChangeCallback\n`\n\n\n`\n\n\n`\n\n|----------------------------------------------|\n| android.os.IBinder.FrozenStateChangeCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA callback interface for receiving frozen state change events.\n\nSummary\n-------\n\n| ### Constants ||\n|-------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [STATE_FROZEN](/reference/android/os/IBinder.FrozenStateChangeCallback#STATE_FROZEN) Represents the frozen state of the remote process. |\n| `int` | [STATE_UNFROZEN](/reference/android/os/IBinder.FrozenStateChangeCallback#STATE_UNFROZEN) Represents the unfrozen state of the remote process. |\n\n| ### Public methods ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onFrozenStateChanged](/reference/android/os/IBinder.FrozenStateChangeCallback#onFrozenStateChanged(android.os.IBinder,%20int))`(`[IBinder](/reference/android/os/IBinder)` who, int state) ` 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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int STATE_FROZEN\n```\n\nRepresents the frozen state of the remote process.\n\nWhile in this state, the remote process won't be able to receive and handle a\ntransaction. Therefore, any asynchronous transactions will be buffered and delivered when\nthe process is unfrozen, and any synchronous transactions will result in an error.\n\nBuffered transactions may be stale by the time that the process is unfrozen and handles\nthem. To avoid overwhelming the remote process with stale events or overflowing their\nbuffers, it's best to avoid sending binder transactions to a frozen process.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)\n\n\n### STATE_UNFROZEN\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final int STATE_UNFROZEN\n```\n\nRepresents the unfrozen state of the remote process.\n\nIn this state, the process hosting the object can execute and is not restricted\nby the freezer from using the CPU or responding to binder transactions.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\nPublic methods\n--------------\n\n### onFrozenStateChanged\n\nAdded in [API level 36](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onFrozenStateChanged (IBinder who, \n int state)\n```\n\nInterface for receiving a callback when the process hosting an IBinder\nhas changed its frozen state.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `who` | `IBinder`: The IBinder whose hosting process has changed state. This value cannot be `null`. \u003cbr /\u003e |\n| `state` | `int`: The latest state. Value is [STATE_FROZEN](/reference/android/os/IBinder.FrozenStateChangeCallback#STATE_FROZEN), or [STATE_UNFROZEN](/reference/android/os/IBinder.FrozenStateChangeCallback#STATE_UNFROZEN) \u003cbr /\u003e |"]]