Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b4ef09f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Floss: Rename SuspendType entries"

parents d1bfe2ec 625ee07c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -420,8 +420,8 @@ impl PowerdSuspendManager {
        if let Some(adapter_suspend_dbus) = &self.context.lock().unwrap().adapter_suspend_dbus {
            let adapter_suspend_id =
                adapter_suspend_dbus.suspend(match suspend_imminent.get_reason() {
                    SuspendImminent_Reason::IDLE => SuspendType::AllowWakeFromHid,
                    SuspendImminent_Reason::LID_CLOSED => SuspendType::NoWakesAllowed,
                    SuspendImminent_Reason::IDLE => SuspendType::Connected,
                    SuspendImminent_Reason::LID_CLOSED => SuspendType::Disconnected,
                    SuspendImminent_Reason::OTHER => SuspendType::Other,
                });
            log::debug!("Adapter suspend id = {}", adapter_suspend_id);
+4 −6
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@ pub trait ISuspendCallback: RPCProxy {
#[derive(FromPrimitive, ToPrimitive)]
#[repr(u32)]
pub enum SuspendType {
    NoWakesAllowed,
    AllowWakeFromHid,
    Disconnected,
    Connected,
    Other,
}

@@ -128,14 +128,12 @@ impl ISuspend for Suspend {
    fn suspend(&self, suspend_type: SuspendType) -> u32 {
        let suspend_id = 1;
        match suspend_type {
            // TODO(231437552): Rename AllowWakeFromHid to Connected since it isn't only for HID
            SuspendType::AllowWakeFromHid => {
            SuspendType::Connected => {
                // TODO(231345733): API For allowing classic HID only
                // TODO(230604670): check if A2DP is connected
                // TODO(224603198): save all advertiser information
            }
            // TODO(231437552): Rename NoWakesAllowed to Disconnected since it isn't only for HID
            SuspendType::NoWakesAllowed => {
            SuspendType::Disconnected => {
                self.intf.lock().unwrap().clear_event_filter();
                self.intf.lock().unwrap().clear_event_mask();
            }