Structs with user-declared constructors are no longer aggregates.
Remove the user-declared constructors.
Bug: chromium:1284275
PiperOrigin-RevId: 450762391
The medium abstraction layer does not prepopulate the advertisement_bytes ByteArray with Copresence Service UUID. This adds it at the platform impl layer.
PiperOrigin-RevId: 450054877
This CL implements the BLE V1 Medium and its corresponding unit tests:
- Start/Stop Advertising
- Start/Stop Scanning
- Receive BLE Advertisement callbacks handler
- BLE Advertisement Publisher/Watcher status callbacks handler
PiperOrigin-RevId: 449824666
If bluetooth adapter is not present on the Windows device, Nearby Connection will crash. This change resolves the issue by adding null checkers.
PiperOrigin-RevId: 449578225
CreateDataChannelOrError() should be used instead.
If the code referencing the function allows it, error handling has been modified
to match the new function.
PiperOrigin-RevId: 448168890
If the platform (e.g., ChromeOS) doesn't provide an EventLogger, this WARNING is logged for nearly every Nearby Connections method.
PiperOrigin-RevId: 442539723
Rename RevertInitiatedBwuMediumForEndpointIfNecessary to RevertBwuMediumForEndpoint because this method can be called by RESPONDERs of the bandwidth upgrade request. Also, make sure to remove the endpoint from the endpoint-to-medium map.
PiperOrigin-RevId: 442055611
Add unit tests for BaseBwuHandler and BwuManager (BWU initiation only). Add fake classes and helper methods needed for testing. Refine comments and logs.
PiperOrigin-RevId: 442021842
* Fix bandwidth upgrade service ID usage. For instance, no longer use the inaccurate service ID from ClientProxy.
* Add more fine-grained upgraded endpoint tracking using both service IDs and endpoint IDs
* Only "revert" bandwidth-upgrade mediums--for example, stop accepting connections on a server socket--for a service when the last endpoint for that service is finished.
These changes are necessary to support multiple services (e.g., Nearby Share and Phone Hub) and multiple mediums (e.g., WebRTC and WLAN).
PiperOrigin-RevId: 442021257
Consolidate BWU service ID bookkeeping into the BaseBwuHandler class. This eliminates duplicated code in per-medium BWU handlers and allows us to easily augment the bookkeeping with endpoint IDs in a subsequent CL.
Also, localize all service ID wrapping to the BaseBwuHandler class. A postfix is appended to the service ID during bandwidth upgrade, e.g., "NearbyShare_INITIATOR_BWU"; this is done to distinguish a medium's use for advertising/discovery vs. its use for device-to-device connections.
This CL should theoretically be a no-op, but per-medium BWU handlers were inconsistent in their implementations.
PiperOrigin-RevId: 442019603
This CL should be a no-op.
Provide better access to the service ID during bandwidth upgrade handling. Notably, 1) have the endpoint channel store its associated service ID, and 2) send the service ID on a connect/disconnect.
The service ID identifies the application, for example, "NearbySharing". In future CLs, we will use the service IDs to better handle bandwidth-upgrade bookkeeping when multiple services are running simultaneously. Specifically, we will better handle reverting a bandwidth-upgrade medium without interfering with other services.
PiperOrigin-RevId: 442019209