mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
[Nearby Connections] Use async StartScanning when flag enabled
Creates the feature flag `enable_ble_v2_async_scanning_advertising` which enables/disables the use of the async StartScanning, StopScanning, StartAdvertising, StopAdvertising, etc methods over the soon-to-be deprecated synchronous versions of those methods. Opted for feature flag over NearbyFlag, as ChromeOS is the only current consumer and doesn't use Mendel. Also sets the feature flag to enabled in the ServiceControllerRouter, which is where ChromeOS sets NC feature flags at startup. This CL also fully links up the asynchronous Scanning methods. Advertising will be addressed in a follow up CL. PiperOrigin-RevId: 608158273
This commit is contained in:
committed by
Copybara-Service
parent
88064b1543
commit
f09368247b
@@ -463,9 +463,9 @@ class BleMedium {
|
||||
};
|
||||
|
||||
// Async interface for StartScanning.
|
||||
// Result status will be passed to start_advertising_result callback.
|
||||
// To stop advertising, invoke the stop_advertising callback in
|
||||
// AdvertisingSession.
|
||||
// Result status will be passed to start_scanning_result callback.
|
||||
// To stop scanning, invoke the stop_scanning callback in
|
||||
// ScanningSession.
|
||||
virtual std::unique_ptr<ScanningSession> StartScanning(
|
||||
const Uuid& service_uuid, TxPowerLevel tx_power_level,
|
||||
ScanningCallback callback) = 0;
|
||||
|
||||
Reference in New Issue
Block a user