Commit Graph
61 Commits
Author SHA1 Message Date
Edwin Wu ccdcd15e83 Add WEB_RTC_NON_CELLULAR enum, V
PiperOrigin-RevId: 686470433
2024-10-16 05:24:59 -07:00
Francis Tsui c613904a69 allow API to request to disable wifi hotspot
PiperOrigin-RevId: 682473971
2024-10-04 15:37:24 -07:00
Guogang Li d5b5d92f87 Internal logging update
PiperOrigin-RevId: 669420403
2024-08-30 13:08:35 -07:00
Francis Tsui b03a383f7a Trivial replacement of NEARBY_LOG with NEARBY_LOGS.
PiperOrigin-RevId: 667740113
2024-08-26 15:34:21 -07:00
Guogang Li ec0de73e8e internal medium fix
PiperOrigin-RevId: 666509363
2024-08-22 15:22:04 -07:00
Guogang Li 4088e5904f Control Wi-Fi hotspot as client by flag
PiperOrigin-RevId: 663862186
2024-08-16 14:17:40 -07:00
hai007 7c7aa58885 Check if both sides support MultiplexSocket before enabling it.
PiperOrigin-RevId: 660874323
2024-08-08 09:49:56 -07:00
Anay Wadhera 6a5626d057 Deprecate use_medium_in_connection_info flag.
PiperOrigin-RevId: 659623189
2024-08-05 11:33:34 -07:00
Guogang Li c4812a2082 Optimized instant on lost
PiperOrigin-RevId: 659567920
2024-08-05 08:49:36 -07:00
hai007 25deb0962f Implement Bluetooth Multiplex.
PiperOrigin-RevId: 651921709
2024-07-12 16:52:46 -07:00
Guogang Li 4f386b95db Added logic to stabilize endpoint IDs
PiperOrigin-RevId: 644407047
2024-06-18 09:11:51 -07:00
Eiden Kim 51dcfe807d Fix a crash in BasePcpHandler::BreakTie.
PiperOrigin-RevId: 638412219
2024-05-29 14:26:23 -07:00
hai007 7c72774167 Multiplex implementation - Create Multiplex Socket
PiperOrigin-RevId: 632628955
2024-05-10 16:11:26 -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
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
Guogang Li 60735e8e2e Fixed the logic issue to handle discovered endpoint
PiperOrigin-RevId: 573350212
2023-10-13 16:51:36 -07:00
Janusz Sobczak 56acecdffa Migrate to AnyInvocable in DiscoveryListener
PiperOrigin-RevId: 571077933
2023-10-05 11:20:17 -07:00
Juliet Levesque 8be118a3d0 [Nearby Connections] Plumb remote device information much deeper into the stack
This will be needed for the authentication transport as the verifier will need the information about the remote device. This CL is based on logic from
awadhera@ in cl/539175992 with additional unit test coverage.

PiperOrigin-RevId: 565037849
2023-09-13 06:59:50 -07:00
hai007 55aedfb235 Implement Safe to Disconnect feature
PiperOrigin-RevId: 560119556
2023-08-25 09:51:44 -07:00
Guogang Li 6d886e3fc8 Fixed some issues in analytics data
PiperOrigin-RevId: 551900985
2023-07-28 11:13:07 -07:00
Janusz Sobczak cae06bd15d Close executors in BasePcpHandler::Shutdown
The client can call DisconnectFromEndpointManager() explicitly before
BasePcpHandler is shut down. In this case, th executors were not terminated
inside BasePcpHandler::Shutdown()
This caused use-after-free errors in BasePcpHandlerTest.IoError_RequestConnectionFails

PiperOrigin-RevId: 551340708
2023-07-26 16:00:08 -07:00
Anay Wadhera 8450f2b607 add ConnectionsDevice/PresenceDevice to offline frames builders.
PiperOrigin-RevId: 549380626
2023-07-19 11:46:30 -07:00
Janusz Sobczak 9f42452386 Fix PCP handler cleanup
All tasks in base_pcp_handler must complete before
p2p_cluster_pcp_handler is destroyed to prevent use-after-free errors.

Added a couple of missing StopDiscovery calls.

PiperOrigin-RevId: 547931350
2023-07-13 14:56:14 -07:00
Anay Wadhera 4ecbd3bca1 Filter devices based on type when listening for incoming connections.
PiperOrigin-RevId: 546124493
2023-07-06 16:40:00 -07:00
Anay Wadhera 5369c33112 fix tsan error in NC when accessing discovered_endpoints
PiperOrigin-RevId: 546060069
2023-07-06 12:22:55 -07:00
Anay Wadhera f05e24f7ea Plumb updateDiscoveryOptions into pcp handler.
PiperOrigin-RevId: 544431325
2023-06-29 12:33:16 -07:00
Anay Wadhera 1ddd4d91ea Check listening options when checking for bwu possibility
PiperOrigin-RevId: 543509150
2023-06-26 12:22:49 -07:00
Anay Wadhera c5c65714a0 Implement updateAdvertisingOptions
PiperOrigin-RevId: 543502031
2023-06-26 11:55:11 -07:00
Anay Wadhera 7f1d6a4bba Check listening options as well when we want to enforce topology constraints
PiperOrigin-RevId: 543497497
2023-06-26 11:40:17 -07:00
Anay Wadhera 5da4b33824 Revert "Revert incoming connections listener changes for internal breakages."
PiperOrigin-RevId: 542381558
2023-06-21 15:36:44 -07:00
Anay Wadhera 1973b09849 Revert incoming connections listener changes for internal breakages.
PiperOrigin-RevId: 542010849
2023-06-20 12:16:10 -07:00
Anay Wadhera 44fb9b4fa2 implement stoplisteningforincomingconnections
PiperOrigin-RevId: 540724954
2023-06-15 16:43:56 -07:00
Anay Wadhera 5737b867ed implement startlisteningforincomingconnections
PiperOrigin-RevId: 540707703
2023-06-15 15:31:08 -07:00
hai007 1e34f097aa Add test case to verify Connection can fall back to BT if WIFI_LAN fails
PiperOrigin-RevId: 539877670
2023-06-13 00:32:07 -07:00
Anay Wadhera 0ab31f6312 Implement device loss alarms
PiperOrigin-RevId: 538822094
2023-06-08 10:19:44 -07:00
hai007 1e868a1a65 Fix a crash problem related to OnEndpointFound
PiperOrigin-RevId: 536541918
2023-05-30 16:35:11 -07:00
hai007 1b59c39c02 Fix OnEndpointLost behavior error
PiperOrigin-RevId: 533488774
2023-05-19 10:23:41 -07:00
Anay Wadhera f2cadc2815 move payload listeners to absl::AnyInvocable
PiperOrigin-RevId: 533365325
2023-05-18 23:30:01 -07:00
Edwin Wu 94ff506d1e Fixes HelloConnections that can't discover Pixel device from iPhone for Ble_v2 medium.
PiperOrigin-RevId: 517318035
2023-03-16 22:25:21 -07:00
hai007 e2fa1d0409 Fix the supported mediums error
PiperOrigin-RevId: 509999913
2023-02-15 19:54:05 -08:00
Edwin Wu 1e229e31c5 [Nearby Connections] Add OS_INFO for NC C++.
PiperOrigin-RevId: 509443158
2023-02-14 00:05:17 -08:00
hai007 be32b7d2d9 Indicate "Their supported medium" is not real if the other device is host
PiperOrigin-RevId: 508426593
2023-02-09 11:20:39 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
hai007 499b2691f4 WIFI Direct implementation (3)
Part 3: BWU and client interface part

PiperOrigin-RevId: 498218241
2022-12-28 11:22:48 -08:00
Guogang Li 1c32c738fb Call BWU callback after medium connection initiated
PiperOrigin-RevId: 491949519
2022-11-30 10:06:19 -08:00
hai007 2012acdbcc Change BWU priority from Hotspot to WifiLan
PiperOrigin-RevId: 491388299
2022-11-28 10:55:28 -08:00
hai007 5066b189f9 Pass over MediumMetadata to client_proxy for incoming connection
PiperOrigin-RevId: 489597576
2022-11-18 17:41:42 -08:00
Janusz Sobczak 743e9b4a69 Do not use an iterator after modifying a collection
Iterators returned by equals_range() are no longer valid when collection is modified.

PiperOrigin-RevId: 488728730
2022-11-15 12:31:07 -08:00
Eiden Kim 7350643c36 Update Prng usage so that it can generate random values on different threads.
PiperOrigin-RevId: 478025630
2022-09-30 10:31:27 -07:00