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

Commit 6c3e5134 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Revert "Floss: Rename SuspendType entries""

parents 19a91c3e 864886dc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -444,8 +444,8 @@ impl PowerdSuspendManager {
            let context_locked = self.context.lock().unwrap();
            if let Some(adapter_suspend_dbus) = &context_locked.adapter_suspend_dbus {
                adapter_suspend_dbus.suspend(match suspend_imminent.get_reason() {
                    SuspendImminent_Reason::IDLE => SuspendType::Connected,
                    SuspendImminent_Reason::LID_CLOSED => SuspendType::Disconnected,
                    SuspendImminent_Reason::IDLE => SuspendType::AllowWakeFromHid,
                    SuspendImminent_Reason::LID_CLOSED => SuspendType::NoWakesAllowed,
                    SuspendImminent_Reason::OTHER => SuspendType::Other,
                });
            } else {
+4 −4
Original line number Diff line number Diff line
@@ -53,8 +53,8 @@ pub trait ISuspendCallback: RPCProxy {
#[derive(FromPrimitive, ToPrimitive)]
#[repr(u32)]
pub enum SuspendType {
    Disconnected,
    Connected,
    NoWakesAllowed,
    AllowWakeFromHid,
    Other,
}

@@ -128,12 +128,12 @@ impl ISuspend for Suspend {
        // Handle wakeful cases (Connected/Other)
        // Treat Other the same as Connected
        match suspend_type {
            SuspendType::Connected => {
            SuspendType::AllowWakeFromHid => {
                // TODO(231345733): API For allowing classic HID only
                // TODO(230604670): check if A2DP is connected
                // TODO(224603198): save all advertiser information
            }
            SuspendType::Disconnected => {
            SuspendType::NoWakesAllowed => {
                self.intf.lock().unwrap().clear_event_filter();
                self.intf.lock().unwrap().clear_event_mask();
            }