Idle → Adding (window declaration enters composition) Adding → Active (platform placement succeeds) Adding → Failure.Transient (placement fails with a retryable code; another attempt remains) Failure.Transient → Adding (next attempt begins) Adding → Failure.Rejected (placement fails terminally — non-retryable, or attempts exhausted) Adding → Pending (no slot — out-prioritized by the windows holding the slots) Pending → Adding (a slot opened for this window) Active → Preempted (demoted so a higher-priority window can take its slot) Preempted → Adding (a slot opened — re-placed) Active → Removing (window declaration leaves composition) Removing → Removed (cleanup complete) Active → ExternallyRemoved (dismissed by the user or removed by the system, not the app)
code, message, and windowKey via the nested WindowLifecycle.Failure interface, so a single is Failure check surfaces every error while is Failure.Rejected narrows to terminal ones. WindowLifecycle.Pending and WindowLifecycle.Preempted are distinct from WindowLifecycle.Failure: neither is an error, just a window held for capacity or priority that the SDK places automatically once it wins a slot. WindowLifecycle.ExternallyRemoved is the terminal "someone else closed it" signal.
interface WindowLifecycle
object Idle : WindowLifecycle
object Adding : WindowLifecycle
object Active : WindowLifecycle
object Pending : WindowLifecycle
object Preempted : WindowLifecycle
object Removing : WindowLifecycle
object Removed : WindowLifecycle
object ExternallyRemoved : WindowLifecycle
interface Failure : WindowLifecycle
code
: Int
[Get] |
Platform error code reported by the placement attempt. See VwmError.
Signature
abstract val code: Int |
message
: String
[Get] |
Human-readable error description from the platform.
Signature
abstract val message: String |
windowKey
: String
[Get] |
Key of the window that failed.
Signature
abstract val windowKey: String |
data class Transient(val code: Int, val message: String, val windowKey: String, val attempt: Int) :
WindowLifecycle.FailureTransient
(
code
, message
, windowKey
, attempt
)
|
Signature
constructor(code: Int, message: String, windowKey: String, attempt: Int) Parameters code: Intmessage: StringwindowKey: Stringattempt: IntReturns WindowLifecycle.Failure.Transient |
attempt
: Int
[Get] |
Signature
val attempt: Int |
code
: Int
[Get] |
Platform error code reported by the placement attempt. See VwmError.
Signature
open override val code: Int |
message
: String
[Get] |
Human-readable error description from the platform.
Signature
open override val message: String |
windowKey
: String
[Get] |
Key of the window that failed.
Signature
open override val windowKey: String |
data class Rejected(val code: Int, val message: String, val windowKey: String) :
WindowLifecycle.FailureRejected
(
code
, message
, windowKey
)
|
Signature
constructor(code: Int, message: String, windowKey: String) Parameters code: Intmessage: StringwindowKey: StringReturns WindowLifecycle.Failure.Rejected |
code
: Int
[Get] |
Platform error code reported by the placement attempt. See VwmError.
Signature
open override val code: Int |
message
: String
[Get] |
Human-readable error description from the platform.
Signature
open override val message: String |
windowKey
: String
[Get] |
Key of the window that failed.
Signature
open override val windowKey: String |