Loading system/gd/rust/linux/mgmt/src/powerd_suspend_manager.rs +2 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading system/gd/rust/linux/stack/src/suspend.rs +4 −4 Original line number Diff line number Diff line Loading @@ -53,8 +53,8 @@ pub trait ISuspendCallback: RPCProxy { #[derive(FromPrimitive, ToPrimitive)] #[repr(u32)] pub enum SuspendType { Disconnected, Connected, NoWakesAllowed, AllowWakeFromHid, Other, } Loading Loading @@ -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(); } Loading Loading
system/gd/rust/linux/mgmt/src/powerd_suspend_manager.rs +2 −2 Original line number Diff line number Diff line Loading @@ -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 { Loading
system/gd/rust/linux/stack/src/suspend.rs +4 −4 Original line number Diff line number Diff line Loading @@ -53,8 +53,8 @@ pub trait ISuspendCallback: RPCProxy { #[derive(FromPrimitive, ToPrimitive)] #[repr(u32)] pub enum SuspendType { Disconnected, Connected, NoWakesAllowed, AllowWakeFromHid, Other, } Loading Loading @@ -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(); } Loading