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

Commit 02c00c89 authored by Chienyuan's avatar Chienyuan
Browse files

Fix data lost during updateScanMode

Bug: 227582440
Tag: #refactor
Test: gd/cert/run --device --sl4a LeAdvancedScanningTest.test_scan_filter_device_random_address_with_irk_extended_pdu_pending_intent_128_640
Change-Id: I23ae47f4b262bac1d04587a12014b072316101a0
parent 3a4272f5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -111,6 +111,9 @@ import java.util.Objects;
                .setScanResultType(settings.getScanResultType())
                .setReportDelay(settings.getReportDelayMillis())
                .setNumOfMatches(settings.getNumOfMatches())
                .setMatchMode(settings.getMatchMode())
                .setLegacy(settings.getLegacy())
                .setPhy(settings.getPhy())
                .build();
        return true;
    }
+1 −2
Original line number Diff line number Diff line
@@ -886,9 +886,8 @@ class LeAdvancedScanningTest(GdSl4aBaseTestClass):
        addr_type = ble_address_types["random"]
        logging.info("Start scanning for RANDOM_ADDRESS %s with address type %d and IRK %s" %
                     (RANDOM_ADDRESS, addr_type, irk.decode("utf-8")))
        self.dut.sl4a.bleSetScanSettingsScanMode(ble_scan_settings_modes['low_latency'])
        self.dut.sl4a.bleSetScanSettingsScanMode(ble_scan_settings_modes['ambient_discovery'])
        self.dut.sl4a.bleSetScanSettingsLegacy(False)
        self.dut.sl4a.bleSetScanSettingsScanMode(3)  # ambient discovery
        filter_list, scan_settings, scan_callback = generate_ble_scan_objects(self.dut.sl4a)
        # Hard code here since callback index iterates and will cause this to fail if ran
        # Second as the impl in SL4A sends this since its a single callback for broadcast.