Loading system/gd/rust/linux/client/src/command_handler.rs +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use bt_topshim::profiles::hid_host::BthhReportType; use bt_topshim::profiles::sdp::{BtSdpMpsRecord, BtSdpRecord}; use bt_topshim::profiles::{gatt::LePhy, ProfileConnectionState}; use btstack::bluetooth::{BluetoothDevice, IBluetooth}; use btstack::bluetooth_gatt::{GattWriteType, IBluetoothGatt, ScanSettings, ScanType}; use btstack::bluetooth_gatt::{GattWriteType, IBluetoothGatt}; use btstack::bluetooth_media::{IBluetoothMedia, IBluetoothTelephony}; use btstack::bluetooth_qa::IBluetoothQA; use btstack::socket_manager::{IBluetoothSocketManager, SocketResult}; Loading Loading @@ -1267,7 +1267,7 @@ impl CommandHandler { scanner_id, // TODO(b/254870159): Construct real settings and filters depending on // command line options. ScanSettings { interval: 0, window: 0, scan_type: ScanType::Active }, None, Some(btstack::bluetooth_gatt::ScanFilter { rssi_high_threshold: 0, rssi_low_threshold: 0, Loading system/gd/rust/linux/client/src/dbus_iface.rs +1 −1 Original line number Diff line number Diff line Loading @@ -1433,7 +1433,7 @@ impl IBluetoothGatt for BluetoothGattDBus { fn start_scan( &mut self, _scanner_id: u8, _settings: ScanSettings, _settings: Option<ScanSettings>, _filter: Option<ScanFilter>, ) -> BtStatus { dbus_generated!() Loading system/gd/rust/linux/service/src/iface_bluetooth_gatt.rs +1 −1 Original line number Diff line number Diff line Loading @@ -635,7 +635,7 @@ impl IBluetoothGatt for IBluetoothGattDBus { fn start_scan( &mut self, scanner_id: u8, settings: ScanSettings, settings: Option<ScanSettings>, filter: Option<ScanFilter>, ) -> BtStatus { dbus_generated!() Loading system/gd/rust/linux/stack/src/bluetooth_gatt.rs +6 −9 Original line number Diff line number Diff line Loading @@ -388,7 +388,7 @@ pub trait IBluetoothGatt { fn start_scan( &mut self, scanner_id: u8, settings: ScanSettings, settings: Option<ScanSettings>, filter: Option<ScanFilter>, ) -> BtStatus; Loading Loading @@ -1804,7 +1804,7 @@ impl BluetoothGatt { scan_type: ScanType::Active, }; self.start_scan(scanner_id, settings, /*filter=*/ None) self.start_scan(scanner_id, Some(settings), /*filter=*/ None) } pub(crate) fn stop_active_scan(&mut self, scanner_id: u8) -> BtStatus { Loading Loading @@ -1934,7 +1934,7 @@ impl IBluetoothGatt for BluetoothGatt { fn start_scan( &mut self, scanner_id: u8, _settings: ScanSettings, settings: Option<ScanSettings>, filter: Option<ScanFilter>, ) -> BtStatus { let scan_suspend_mode = self.get_scan_suspend_mode(); Loading @@ -1942,15 +1942,12 @@ impl IBluetoothGatt for BluetoothGatt { return BtStatus::Busy; } // We're supposed to directly use the settings provided by the input parameter, but // currently UI is sending temporary variables instead. Therefore, load some preset values // known to work. // TODO(b/217274013): Fix UI plumbing and directly use the provided settings. let settings = ScanSettings { // If the client is not specifying scan settings, the default one will be used. let settings = settings.unwrap_or_else(|| ScanSettings { interval: sysprop::get_i32(sysprop::PropertyI32::LeInquiryScanInterval), window: sysprop::get_i32(sysprop::PropertyI32::LeInquiryScanWindow), scan_type: ScanType::Active, }; }); // Multiplexing scanners happens at this layer. The implementations of start_scan // and stop_scan maintains the state of all registered scanners and based on the states Loading Loading
system/gd/rust/linux/client/src/command_handler.rs +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use bt_topshim::profiles::hid_host::BthhReportType; use bt_topshim::profiles::sdp::{BtSdpMpsRecord, BtSdpRecord}; use bt_topshim::profiles::{gatt::LePhy, ProfileConnectionState}; use btstack::bluetooth::{BluetoothDevice, IBluetooth}; use btstack::bluetooth_gatt::{GattWriteType, IBluetoothGatt, ScanSettings, ScanType}; use btstack::bluetooth_gatt::{GattWriteType, IBluetoothGatt}; use btstack::bluetooth_media::{IBluetoothMedia, IBluetoothTelephony}; use btstack::bluetooth_qa::IBluetoothQA; use btstack::socket_manager::{IBluetoothSocketManager, SocketResult}; Loading Loading @@ -1267,7 +1267,7 @@ impl CommandHandler { scanner_id, // TODO(b/254870159): Construct real settings and filters depending on // command line options. ScanSettings { interval: 0, window: 0, scan_type: ScanType::Active }, None, Some(btstack::bluetooth_gatt::ScanFilter { rssi_high_threshold: 0, rssi_low_threshold: 0, Loading
system/gd/rust/linux/client/src/dbus_iface.rs +1 −1 Original line number Diff line number Diff line Loading @@ -1433,7 +1433,7 @@ impl IBluetoothGatt for BluetoothGattDBus { fn start_scan( &mut self, _scanner_id: u8, _settings: ScanSettings, _settings: Option<ScanSettings>, _filter: Option<ScanFilter>, ) -> BtStatus { dbus_generated!() Loading
system/gd/rust/linux/service/src/iface_bluetooth_gatt.rs +1 −1 Original line number Diff line number Diff line Loading @@ -635,7 +635,7 @@ impl IBluetoothGatt for IBluetoothGattDBus { fn start_scan( &mut self, scanner_id: u8, settings: ScanSettings, settings: Option<ScanSettings>, filter: Option<ScanFilter>, ) -> BtStatus { dbus_generated!() Loading
system/gd/rust/linux/stack/src/bluetooth_gatt.rs +6 −9 Original line number Diff line number Diff line Loading @@ -388,7 +388,7 @@ pub trait IBluetoothGatt { fn start_scan( &mut self, scanner_id: u8, settings: ScanSettings, settings: Option<ScanSettings>, filter: Option<ScanFilter>, ) -> BtStatus; Loading Loading @@ -1804,7 +1804,7 @@ impl BluetoothGatt { scan_type: ScanType::Active, }; self.start_scan(scanner_id, settings, /*filter=*/ None) self.start_scan(scanner_id, Some(settings), /*filter=*/ None) } pub(crate) fn stop_active_scan(&mut self, scanner_id: u8) -> BtStatus { Loading Loading @@ -1934,7 +1934,7 @@ impl IBluetoothGatt for BluetoothGatt { fn start_scan( &mut self, scanner_id: u8, _settings: ScanSettings, settings: Option<ScanSettings>, filter: Option<ScanFilter>, ) -> BtStatus { let scan_suspend_mode = self.get_scan_suspend_mode(); Loading @@ -1942,15 +1942,12 @@ impl IBluetoothGatt for BluetoothGatt { return BtStatus::Busy; } // We're supposed to directly use the settings provided by the input parameter, but // currently UI is sending temporary variables instead. Therefore, load some preset values // known to work. // TODO(b/217274013): Fix UI plumbing and directly use the provided settings. let settings = ScanSettings { // If the client is not specifying scan settings, the default one will be used. let settings = settings.unwrap_or_else(|| ScanSettings { interval: sysprop::get_i32(sysprop::PropertyI32::LeInquiryScanInterval), window: sysprop::get_i32(sysprop::PropertyI32::LeInquiryScanWindow), scan_type: ScanType::Active, }; }); // Multiplexing scanners happens at this layer. The implementations of start_scan // and stop_scan maintains the state of all registered scanners and based on the states Loading