Commit Graph
344 Commits
Author SHA1 Message Date
Guogang Li 4f386b95db Added logic to stabilize endpoint IDs
PiperOrigin-RevId: 644407047
2024-06-18 09:11:51 -07:00
Crisrael Lucero acc38a809b [Nearby Presence] Update ScanManager to trigger changed and lost events
PiperOrigin-RevId: 644072733
2024-06-17 11:17:00 -07:00
Guogang Li 7d86d17ba6 Add a flag to control whether to use stable endpoint ID.
PiperOrigin-RevId: 643041599
2024-06-13 10:21:51 -07:00
Guogang Li bf5f843dfe Added logic to stabilize endpoint IDs
PiperOrigin-RevId: 642774719
2024-06-12 16:23:34 -07:00
Guogang Li b2f8233294 Added logic to stabilize endpoint IDs
PiperOrigin-RevId: 642624940
2024-06-12 08:36:57 -07:00
Guogang Li bc66c63a48 Fixed the issues to handle on lost advertisement
PiperOrigin-RevId: 641268507
2024-06-07 09:14:10 -07:00
Eiden Kim 51dcfe807d Fix a crash in BasePcpHandler::BreakTie.
PiperOrigin-RevId: 638412219
2024-05-29 14:26:23 -07:00
Eiden Kim 76b4f6c51a Block any upgrade path available frames in Advertising side
PiperOrigin-RevId: 636753678
2024-05-23 19:29:19 -07:00
Eiden Kim dca2997f5d Added more checks to file path validation.
PiperOrigin-RevId: 635580793
2024-05-20 15:03:50 -07:00
Eiden Kim b224f8660c Check illegal characters from the file and parent folder name
PiperOrigin-RevId: 634941778
2024-05-17 18:46:26 -07:00
Eiden Kim 33d66fd169 Check illegal characters from the file and parent folder name
PiperOrigin-RevId: 634598623
2024-05-16 18:54:45 -07:00
hai007 00e8286021 add connection mode
PiperOrigin-RevId: 633706665
2024-05-14 14:28:03 -07:00
hai007 1c8395eede Fix the bug that the multiplex socket is not closed properly.
PiperOrigin-RevId: 633675141
2024-05-14 12:47:19 -07:00
hai007 7c72774167 Multiplex implementation - Create Multiplex Socket
PiperOrigin-RevId: 632628955
2024-05-10 16:11:26 -07:00
Eiden Kim 6d4f2c2606 Add a flag to check illegal characters in the file name and parent folder
PiperOrigin-RevId: 632577432
2024-05-10 12:50:45 -07:00
Hai Shang ce030a76b6 internal cleanup
PiperOrigin-RevId: 632285218
2024-05-09 15:20:03 -07:00
Anay Wadhera 3b701c78f3 Deny and abort payloads with ID 0.
PiperOrigin-RevId: 631864387
2024-05-08 11:24:21 -07:00
Anay Wadhera 85ebca532e Fix not rejecting a frame with an empty endpoint ID.
PiperOrigin-RevId: 631563161
2024-05-07 15:12:09 -07:00
Hai Shang 77515694c8 Internal fix.
PiperOrigin-RevId: 628181275
2024-04-25 13:56:13 -07:00
Hai Shang bcad0cae6e Last CL for the 1 bit solution in BLE v2.
PiperOrigin-RevId: 625856655
2024-04-17 17:31:38 -07:00
Francis Tsui 012b9b0569 Cleanup EventLogger interface.
PiperOrigin-RevId: 625797877
2024-04-17 13:59:30 -07:00
Eiden Kim 35a8289ef4 Block any BWU frames before the NC connection accepted by both side
PiperOrigin-RevId: 625459811
2024-04-16 14:49:14 -07:00
Eiden Kim b40a0d9046 Add a flag to nearby_connections_feature_flags.h manually
PiperOrigin-RevId: 625010913
2024-04-15 10:46:28 -07:00
Daniel Classon 05dac6b184 [Nearby Connections] Rename async scanning flag
Renames the enable_ble_v2_async_scanning_advertising flag to just
enable_ble_v2_async_scanning, reflecting that scanning/advertising
can be enabled independently. Work required to add async
advertising is tracked in b/333408829.

PiperOrigin-RevId: 624254277
2024-04-12 12:15:21 -07:00
hai007 1e1d841965 Multiplex implementation - Create Virtual Output Stream
PiperOrigin-RevId: 623540454
2024-04-10 10:44:50 -07:00
Hai Shang 8f51d92f22 internal fix
PiperOrigin-RevId: 622893779
2024-04-08 10:49:27 -07:00
Hai Shang d2c8fc3cd5 Internal fix
PiperOrigin-RevId: 622865759
2024-04-08 09:18:16 -07:00
hai007 2a56254756 Automated Code Change
PiperOrigin-RevId: 621908243
2024-04-04 10:52:30 -07:00
Hai Shang ca936891c8 Add start/stop legacyDeviceAdvertising in connections ble v2
PiperOrigin-RevId: 621303221
2024-04-02 14:52:36 -07:00
hai007 ce7fc7ef69 Automated Code Change
PiperOrigin-RevId: 621128773
2024-04-02 04:21:56 -07:00
Hai Shang 6162fb5f80 add legacy_device_discovered_cb to DiscoveredPeripheralCallback
PiperOrigin-RevId: 619702145
2024-03-27 17:45:37 -07:00
hai007 a633a940f4 Multiplex implementation - Frame generation
PiperOrigin-RevId: 616247739
2024-03-15 14:45:01 -07:00
Francis Tsui a082f36021 Switch glog to absl::log.
PiperOrigin-RevId: 615535748
2024-03-13 14:03:23 -07:00
hai007 87def076a5 Internal change
PiperOrigin-RevId: 613818883
2024-03-08 14:40:41 -08:00
Hai Shang c2495b275a Internal cleanup
PiperOrigin-RevId: 613362254
2024-03-06 15:35:09 -08:00
Juliet Levesque ecb9de0cbc [Nearby Presence] Add authentication status to InitialConnectionInfo
Adds authentication status to `InitialConnectionInfo`, which will pass the result of the authentication to clients when the connection is complete. See go/cros-nearby-presence-np-nc-authentication for details. This is used to communicate the authentication status to clients of RequestConnectionV3().

PiperOrigin-RevId: 613278476
2024-03-06 11:10:38 -08:00
Copybara-Service ee404cb766 Merge pull request #2307 from ChenWangG:patch-1
PiperOrigin-RevId: 612604370
2024-03-04 15:42:43 -08:00
Juliet Levesque f235957345 [Nearby Presence] Authenticate the connection using the DeviceProvider
Once the encryption protocol has been completed successfully, authentication the connection using the registered DeviceProvider from the ClientProxy. For the Nearby Presence MVP, this will be the PresenceDeviceProvider and will only support outgoing connections, which is why the responder role is not used. The result (success or failure) is passed back to callers via the EndpointManager. See go/cros-nearby-presence-np-nc-authentication  for details.

PiperOrigin-RevId: 611255632
2024-02-28 15:51:37 -08:00
Juliet Levesque 5f616fa592 [Nearby Presence] Pass remote device and EndpointManager throughout connection flow
In order to construct the `ConnectionsAuthenticationTransport` and authentication the connection with the `DeviceProvider`, the remote NearbyDevice and EndpointManager used in RequestConnectionV3() must be passed through the encryption protocol as parameters. This CL accomplishes this; it passes the remote NearbyDevice and EndpointManager through a successful encryption flow by introducting new functions to support this V3 protocol. They will be used in a follow up CL to authenticate the connection. See go/cros-nearby-presence-np-nc-authentication  for details.

PiperOrigin-RevId: 610810602
2024-02-27 11:05:52 -08:00
Suet-Fei Li fa2bcbe579 Internal Refactor.
PiperOrigin-RevId: 610806721
2024-02-27 10:56:35 -08:00
Suet-Fei Li 84062c8a3b Internal Refactor.
PiperOrigin-RevId: 609768025
2024-02-23 10:29:22 -08:00
Daniel Classon f09368247b [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
2024-02-18 12:59:02 -08:00
Juliet Levesque d497c2e97c [Nearby Presence] Add authentication status to PendingConnectionInfo
Adds authentication status to `PendingConnectionInfo`, which will pass the result of the authentication to clients when the connection is complete. See go/cros-nearby-presence-np-nc-authentication for details. This will be used in follow up CL to communicate the authentication status to clients of RequestConnectionV3().

PiperOrigin-RevId: 607402836
2024-02-15 11:39:55 -08:00
Anay Wadhera 80c0d0916e Introduce basic handling for on lost advertisements.
PiperOrigin-RevId: 602910198
2024-01-30 19:33:35 -08:00
Anay Wadhera d1a6913017 Don't check IsDiscovering() when going to rotate endpoint ID
PiperOrigin-RevId: 601489921
2024-01-25 10:30:23 -08:00
hai007 f112d9ff71 Change code to follow payload ack send/receive frame format change.
PiperOrigin-RevId: 601486151
2024-01-25 10:17:23 -08:00
hai007 2fc575b593 [NC] Add ServiceControllerRouter constructor for EnableBleV2
Adds a new constructor for the ServiceControllerRouter which overrides
the value of the EnableBleV2 flag in Nearby Connections.

PiperOrigin-RevId: 601236068
2024-01-24 14:32:00 -08:00
hai007 2149b842f8 Allow client to use flags
PiperOrigin-RevId: 599243081
2024-01-17 11:50:06 -08:00
Francis Tsui c2ade33c9c No public changes.
PiperOrigin-RevId: 597033150
2024-01-09 13:46:42 -08:00
Francis Tsui 1072030be8 Copy sharing/internal, sharing/common and sharing/scheduling to github.
- Move Abseil pin to same as that used in Chromium.
- Disabled layering_check due to build failure in absl.

PiperOrigin-RevId: 596631921
2024-01-08 10:20:37 -08:00