Loading system/gd/rust/linux/mgmt/src/bin/btmanagerd/bluetooth_manager.rs +7 −9 Original line number Diff line number Diff line use log::{error, info}; use log::{error, info, warn}; use manager_service::iface_bluetooth_manager::{ AdapterWithEnabled, IBluetoothManager, IBluetoothManagerCallback, Loading Loading @@ -123,10 +123,9 @@ impl IBluetoothManager for BluetoothManager { let prev = self.manager_context.floss_enabled.swap(enabled, Ordering::Relaxed); config_util::write_floss_enabled(enabled); if prev != enabled && enabled { Command::new("initctl") .args(&["stop", BLUEZ_INIT_TARGET]) .output() .expect("failed to stop bluetoothd"); if let Err(e) = Command::new("initctl").args(&["stop", BLUEZ_INIT_TARGET]).output() { warn!("Failed to stop bluetoothd: {}", e); } // TODO: Implement multi-hci case let default_device = config_util::list_hci_devices()[0]; if config_util::is_hci_n_enabled(default_device) { Loading @@ -136,10 +135,9 @@ impl IBluetoothManager for BluetoothManager { // TODO: Implement multi-hci case let default_device = config_util::list_hci_devices()[0]; self.manager_context.proxy.stop_bluetooth(default_device); Command::new("initctl") .args(&["start", BLUEZ_INIT_TARGET]) .output() .expect("failed to start bluetoothd"); if let Err(e) = Command::new("initctl").args(&["start", BLUEZ_INIT_TARGET]).output() { warn!("Failed to start bluetoothd: {}", e); } } } Loading system/gd/rust/linux/mgmt/src/bin/btmanagerd/state_machine.rs +8 −4 Original line number Diff line number Diff line Loading @@ -495,17 +495,21 @@ impl UpstartInvoker { impl ProcessManager for UpstartInvoker { fn start(&mut self, hci_interface: String) { Command::new("initctl") if let Err(e) = Command::new("initctl") .args(&["start", "btadapterd", format!("HCI={}", hci_interface).as_str()]) .output() .expect("failed to start bluetooth"); { error!("Failed to start btadapterd: {}", e); } } fn stop(&mut self, hci_interface: String) { Command::new("initctl") if let Err(e) = Command::new("initctl") .args(&["stop", "btadapterd", format!("HCI={}", hci_interface).as_str()]) .output() .expect("failed to stop bluetooth"); { error!("Failed to stop btadapterd: {}", e); } } } Loading system/osi/src/alarm.cc +0 −1 Original line number Diff line number Diff line Loading @@ -474,7 +474,6 @@ static void reschedule_root_alarm(void) { if (!timer_set) { if (!wakelock_acquire()) { LOG_ERROR("%s unable to acquire wake lock", __func__); goto done; } } Loading Loading
system/gd/rust/linux/mgmt/src/bin/btmanagerd/bluetooth_manager.rs +7 −9 Original line number Diff line number Diff line use log::{error, info}; use log::{error, info, warn}; use manager_service::iface_bluetooth_manager::{ AdapterWithEnabled, IBluetoothManager, IBluetoothManagerCallback, Loading Loading @@ -123,10 +123,9 @@ impl IBluetoothManager for BluetoothManager { let prev = self.manager_context.floss_enabled.swap(enabled, Ordering::Relaxed); config_util::write_floss_enabled(enabled); if prev != enabled && enabled { Command::new("initctl") .args(&["stop", BLUEZ_INIT_TARGET]) .output() .expect("failed to stop bluetoothd"); if let Err(e) = Command::new("initctl").args(&["stop", BLUEZ_INIT_TARGET]).output() { warn!("Failed to stop bluetoothd: {}", e); } // TODO: Implement multi-hci case let default_device = config_util::list_hci_devices()[0]; if config_util::is_hci_n_enabled(default_device) { Loading @@ -136,10 +135,9 @@ impl IBluetoothManager for BluetoothManager { // TODO: Implement multi-hci case let default_device = config_util::list_hci_devices()[0]; self.manager_context.proxy.stop_bluetooth(default_device); Command::new("initctl") .args(&["start", BLUEZ_INIT_TARGET]) .output() .expect("failed to start bluetoothd"); if let Err(e) = Command::new("initctl").args(&["start", BLUEZ_INIT_TARGET]).output() { warn!("Failed to start bluetoothd: {}", e); } } } Loading
system/gd/rust/linux/mgmt/src/bin/btmanagerd/state_machine.rs +8 −4 Original line number Diff line number Diff line Loading @@ -495,17 +495,21 @@ impl UpstartInvoker { impl ProcessManager for UpstartInvoker { fn start(&mut self, hci_interface: String) { Command::new("initctl") if let Err(e) = Command::new("initctl") .args(&["start", "btadapterd", format!("HCI={}", hci_interface).as_str()]) .output() .expect("failed to start bluetooth"); { error!("Failed to start btadapterd: {}", e); } } fn stop(&mut self, hci_interface: String) { Command::new("initctl") if let Err(e) = Command::new("initctl") .args(&["stop", "btadapterd", format!("HCI={}", hci_interface).as_str()]) .output() .expect("failed to stop bluetooth"); { error!("Failed to stop btadapterd: {}", e); } } } Loading
system/osi/src/alarm.cc +0 −1 Original line number Diff line number Diff line Loading @@ -474,7 +474,6 @@ static void reschedule_root_alarm(void) { if (!timer_set) { if (!wakelock_acquire()) { LOG_ERROR("%s unable to acquire wake lock", __func__); goto done; } } Loading