From: Jakub Pawlowski Date: Wed, 29 Mar 2017 21:28:43 +0000 (-0700) Subject: Bluetooth 5 periodic scan (2/3) X-Git-Tag: android-x86-8.1-r1~62^2^2~47 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f786f005608ac2258367ff5ee1f76db6c773d0bd;p=android-x86%2Fsystem-bt.git Bluetooth 5 periodic scan (2/3) This patch wires calls/callbacks through stack to prepare for actual implementation. Test: manual Bug: 30622771 Change-Id: Iac8c74a228f34f5ea4231a76848e22ea64f11d06 (cherry picked from commit f685bfb7b1f6da17165a33590b18f559476e670f) --- diff --git a/btif/src/btif_ble_scanner.cc b/btif/src/btif_ble_scanner.cc index 4fb351780..c23c75120 100644 --- a/btif/src/btif_ble_scanner.cc +++ b/btif/src/btif_ble_scanner.cc @@ -420,6 +420,12 @@ class BleScannerInterfaceImpl : public BleScannerInterface { base::Bind(&BTM_BleReadScanReports, (uint8_t)scan_mode, Bind(bta_batch_scan_reports_cb, client_if))); } + + void StartSync(uint8_t sid, bt_bdaddr_t address, uint16_t skip, + uint16_t timeout, StartSyncCb start_cb, SyncReportCb report_cb, + SyncLostCb lost_cb) override {} + + void StopSync(uint16_t handle) override {} }; BleScannerInterface* btLeScannerInstance = nullptr; diff --git a/service/test/low_energy_scanner_unittest.cc b/service/test/low_energy_scanner_unittest.cc index a53d2c473..dc20ecfb3 100644 --- a/service/test/low_energy_scanner_unittest.cc +++ b/service/test/low_energy_scanner_unittest.cc @@ -67,6 +67,10 @@ class MockScannerHandler : public BleScannerInterface { MOCK_METHOD2(BatchscanReadReports, void(int client_if, int scan_mode)); + MOCK_METHOD7(StartSync, void(uint8_t, bt_bdaddr_t, uint16_t, uint16_t, + StartSyncCb, SyncReportCb, SyncLostCb)); + MOCK_METHOD1(StopSync, void(uint16_t)); + void ScanFilterAddRemove(int action, int filt_type, int filt_index, int company_id, int company_id_mask, const bt_uuid_t* p_uuid,