FrozenStateChangeCallback
interface FrozenStateChangeCallback
android.os.IBinder.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 |
onFrozenStateChanged(who: IBinder, state: Int) 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.
Parameters | |
---|---|
who |
IBinder: The IBinder whose hosting process has changed state. This value cannot be null . |
state |
Int: The latest state. Value is android.os.IBinder.FrozenStateChangeCallback#STATE_FROZEN , or android.os.IBinder.FrozenStateChangeCallback#STATE_UNFROZEN |