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

Commit 864886dc authored by Martin Brabham's avatar Martin Brabham
Browse files

Revert "Floss: Rename SuspendType entries"

This reverts commit 625ee07c.

Bug: 231437552
Test: mma -j $(nproc)
Test: ./build.py
Test: system/gd/cert/run --clean --topshim
Change-Id: Iad8540940c3f74664d7b2bf4ebe6986d181b937b
parent ac515334
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();
            }