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

Commit c4755f4c authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

floss: Scanner.StartScan: Use Passive scan by default

Currently ChromeOS doesn't have a feature requires Active LE scan.
Set default to Passive as a workaround for the FW issue on Trogdor,
while still allow the user to set Active in the future.

Bug: 290300475
Tag: #floss
Test: mmm packages/modules/Bluetooth
Test: Manual: Pairing, FP, NS sender/receiver, PhoneHub, and SmartLock
      on Cherry/Tomato, Guybrush/Nipperkin, Nami/Sona, and Trogdor
Test: bluetooth_AdapterAdvMonitor.advmon_hci_events_filtered_tests.floss
      on Cherry/Tomato, Guybrush/Nipperkin, and Trogdor
Test: bluetooth_AdapterLEHealth.all_floss on Nami/Sona
Test: bluetooth_AdapterQuickHealth.AVL.floss on Cherry/Tomato
Flag: EXEMPT, Floss-only changes
Change-Id: Ic528048099d060fbb8ef093c2ff3c556f04958b4
parent 1ad187a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1173,7 +1173,7 @@ pub enum ScanType {

impl Default for ScanType {
    fn default() -> Self {
        ScanType::Active
        ScanType::Passive
    }
}

@@ -2057,7 +2057,7 @@ impl IBluetoothGatt for BluetoothGatt {
        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,
            scan_type: ScanType::default(),
        });

        // Multiplexing scanners happens at this layer. The implementations of start_scan