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