pub enum ActivityGovernorListenerRequest {
OnResume {
responder: ActivityGovernorListenerOnResumeResponder,
},
OnSuspendStarted {
responder: ActivityGovernorListenerOnSuspendStartedResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: ActivityGovernorListenerControlHandle,
method_type: MethodType,
},
}
Expand description
A listener for activity governor events.
Variants§
OnResume
Called when the activity governor detects a system resume.
This is only called when the wakeup reason returned by the platform requires a full system resume. All dependencies of ExecutionStateLevel::SUSPENDING are guaranteed to be satisified when this call is issued, and the listener’s OnSuspendStarted method will be invoked before that guarantee is removed.
SAG does not block on the response to this method, so the listener 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: ActivityGovernorListenerOnResumeResponder
OnSuspendStarted
Called before the activity governor initiates a system suspension.
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.
It is not safe for this method to call ActivityGovernor.TakeApplicationActivityLease or to perform any other 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
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ActivityGovernorListenerControlHandle
method_type: MethodType
Implementations§
Source§impl ActivityGovernorListenerRequest
impl ActivityGovernorListenerRequest
pub fn into_on_resume(self) -> Option<ActivityGovernorListenerOnResumeResponder>
pub fn into_on_suspend_started( self, ) -> Option<ActivityGovernorListenerOnSuspendStartedResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL