pub enum SuspendBlockerRequest {
BeforeSuspend {
responder: SuspendBlockerBeforeSuspendResponder,
},
AfterResume {
responder: SuspendBlockerAfterResumeResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: SuspendBlockerControlHandle,
method_type: MethodType,
},
}
Expand description
An entity that blocks suspend until it handles transitions across hardware platform suspend and resume.
Variants§
BeforeSuspend
Called after system activity governor begins operations to suspend the hardware platform.
The server is expected to respond once it has performed the operations
it needs to prepare itself for suspend, if any. All dependencies of
ExecutionStateLevel::SUSPENDING
are guaranteed to be satisified for
the duration of this call and may be revoked once the server replies.
Operations to suspend the hardware platform may vary between different
hardware platforms and product configurations. At a minimum, the client
and server MUST assume that general code execution continues
until a reply to this call is received by the client. If the
SuspendBlocker wants to preempt suspend operations, it MUST call
ActivityGovernor.AcquireWakeLease
before replying to this call.
SuspendBlocker MUST NOT call
ActivityGovernor.TakeApplicationActivityLease
nor perform any action
that blocks on raising Execution State above its Inactive level.
(However, AcquireWakeLease does not block in this way and is safe to
call.) Doing so will currently result in a deadlock. This constraint
will eventually be removed; see https://fxbug.dev/391429689.
Fields
responder: SuspendBlockerBeforeSuspendResponder
AfterResume
Called after system activity governor is aware that the hardware platform has resumed.
All dependencies of ExecutionStateLevel::SUSPENDING
are guaranteed to
be satisified when this call is issued, and the BeforeSuspend
method
will be invoked before that guarantee is removed.
SAG does not block on the response to this method, so the SuspendBlocker may safely take actions that block on raising Execution State’s power level. In particular, it is not affected by https://fxbug.dev/391429689.
Fields
responder: SuspendBlockerAfterResumeResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: SuspendBlockerControlHandle
method_type: MethodType
Implementations§
Source§impl SuspendBlockerRequest
impl SuspendBlockerRequest
pub fn into_before_suspend(self) -> Option<SuspendBlockerBeforeSuspendResponder>
pub fn into_after_resume(self) -> Option<SuspendBlockerAfterResumeResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL