Commit Graph
301 Commits
Author SHA1 Message Date
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
hai007 6ae46a9496 Add visibilities
PiperOrigin-RevId: 596118852
2024-01-05 17:26:39 -08:00
Hai Shang 78609d17a1 Internal fix
PiperOrigin-RevId: 592955244
2023-12-21 14:51:55 -08:00
hai007 16cb7f70b3 Implement Auto-reconnect after disconnection [1]
PiperOrigin-RevId: 592344338
2023-12-19 14:27:40 -08:00
Anay Wadhera 7022e6c5d9 Create instant on loss advertisement format
PiperOrigin-RevId: 590680562
2023-12-13 12:33:12 -08:00
Guogang Li ceded2da84 Added more logs on bandwidth upgrade
PiperOrigin-RevId: 590229747
2023-12-12 09:22:45 -08:00
Hai Shang dde1588871 internal fix
PiperOrigin-RevId: 589025655
2023-12-07 23:21:12 -08:00
hai007 b675986871 create a new PacketType "PAYLOAD_ACK" to replace ControlMessage.EventType "PAYLOAD_RECEIVED_ACK"
PiperOrigin-RevId: 588287541
2023-12-05 21:47:49 -08:00
hai007 6ebe52a418 Add Intel PIE based API to set Hotspot client scan channel
PiperOrigin-RevId: 586019580
2023-11-28 10:09:16 -08:00
Hai Shang 6ee53db8f5 Internal fix on p2p_cluster_pcp_handler
PiperOrigin-RevId: 584669043
2023-11-22 10:44:38 -08:00
Hai Shang 8987ddd461 Add more logs for bwu_manager
PiperOrigin-RevId: 584429491
2023-11-21 14:27:18 -08:00
Guogang Li 60735e8e2e Fixed the logic issue to handle discovered endpoint
PiperOrigin-RevId: 573350212
2023-10-13 16:51:36 -07:00
Anay Wadhera b0ab83535f silly season
PiperOrigin-RevId: 572781177
2023-10-11 22:08:37 -07:00
hai007 1d7751f581 fix auto-resume logging issue
PiperOrigin-RevId: 571981185
2023-10-12 04:48:08 +00:00
Janusz Sobczak 56acecdffa Migrate to AnyInvocable in DiscoveryListener
PiperOrigin-RevId: 571077933
2023-10-05 11:20:17 -07:00
hai007 dfd3de80cf Set a separate shorter timeout (10s) for REMOTE_DISCONNECTION
PiperOrigin-RevId: 570795839
2023-10-04 13:51:54 -07:00
hai007 d477a2d174 Apply GO frequency to NC that queries from Intel PIE SDK
PiperOrigin-RevId: 569558266
2023-09-29 12:25:01 -07:00
Janusz Sobczak 746a8b6231 Use AnyInvocable in mediums/ble_v2
PiperOrigin-RevId: 566437160
2023-09-18 15:56:54 -07:00
Janusz Sobczak 48eeee8d2b Migrate to AnyInvocable in webrtc medium
PiperOrigin-RevId: 565805742
2023-09-15 16:26:09 -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
Janusz Sobczak 52c3360bd3 Use AnyInvocable in DiscoveredPeripheralCallback
PiperOrigin-RevId: 564523999
2023-09-11 15:48:25 -07:00
Nick Bourdakos 981ad214cd Add BLEv2 as an option for point-to-point and star strategies (currently this is only supported by cluster)
PiperOrigin-RevId: 563202701
2023-09-06 13:40:29 -07:00
Guogang Li b7628b098b Set safe disconnection version to correct value
PiperOrigin-RevId: 561842110
2023-08-31 21:12:12 -07:00
hai007 55aedfb235 Implement Safe to Disconnect feature
PiperOrigin-RevId: 560119556
2023-08-25 09:51:44 -07:00
Guogang Li ea7aa00e0c Avoid reading GATT server for same advertisement
PiperOrigin-RevId: 558944228
2023-08-21 17:24:03 -07:00
Janusz Sobczak e38ce96964 Replace AcceptedConnectionCallback structs with absl::AnyInvocable
PiperOrigin-RevId: 557949490
2023-08-17 15:14:25 -07:00
Janusz Sobczak 55194622a7 Migrate to AnyInvocable
PiperOrigin-RevId: 557660146
2023-08-16 18:13:11 -07:00
Janusz Sobczak ec139d1e8b Replace std::function with AnyInvocable
Also refactored the callbacks to make sure that we call either on_success or on_failure callback, and only once.

PiperOrigin-RevId: 557299838
2023-08-15 17:20:30 -07:00
Janusz Sobczak 2c55c0cdbd Refactor Pipe implementation
* Remove Pipe classes
* Rename BasePipe to Pipe
* Hide Pipe class in anonymous namespace in pipe.cc
* Add CreatePipe static method
* Replace Payload(std::function<InputStream&()>) with Payload(std::unique_ptr<InputStream>)
* Find&Replace Pipe usages

PiperOrigin-RevId: 557276980
2023-08-15 15:53:58 -07:00
hai007 eb4a37084b Support dynamic upgrade when the device is connected to Wifi AP after initial connection.
PiperOrigin-RevId: 556959762
2023-08-14 17:25:59 -07:00
Janusz Sobczak 8ccb9fcfec Replace std::function with AnyInvocable
PiperOrigin-RevId: 556090653
2023-08-11 14:27:08 -07:00
Janusz Sobczak cce7cf59b9 Replace std::function with AnyInvocable
PiperOrigin-RevId: 555650115
2023-08-10 14:17:31 -07:00
Janusz Sobczak 5393daf9f1 Merge logging and types build targets
Both "types" and "logging" build targets included "logging.h"
Merging them together avoids circular dependencies.

PiperOrigin-RevId: 555262816
2023-08-09 19:13:12 -07:00
Guogang Li b798798f5f Log medium type for discovered endpoint
PiperOrigin-RevId: 553510472
2023-08-09 19:09:42 -07:00
Janusz Sobczak 5acf702660 Use endpoint lost alarms on PCP handler thread only
endpoint_lost_by_medium_alarms_ should be accessed only
on PCP handler thread to avoid race conditions.
Added thread annotations to protect against accidental use on a different thread.
Test only change.

PiperOrigin-RevId: 551919704
2023-07-28 12:21:32 -07:00
Guogang Li 6d886e3fc8 Fixed some issues in analytics data
PiperOrigin-RevId: 551900985
2023-07-28 11:13:07 -07:00
Janusz Sobczak f3bbb8caeb Fix race condition in ThroughputRecorder
PiperOrigin-RevId: 551361687
2023-07-26 17:28:45 -07:00
Janusz Sobczak 2c1ed158bc Add StopDiscovery call
Test only change.

PiperOrigin-RevId: 551358525
2023-07-26 17:14:08 -07:00
Janusz Sobczak 35acd3d849 Destroy ThroughputRecorder when PendingPayload is destroyed
This fixes a race condition where a Tp Recorder was used after being destroyed.

PiperOrigin-RevId: 551350023
2023-07-26 16:36:25 -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 4958a32c35 make ResultCallback a bare function type and convert to AnyInvocable
PiperOrigin-RevId: 551081080
2023-07-25 21:07:48 -07:00
Janusz Sobczak c9d1b69d41 Set expected latch before sending messages
This closes a time window where the sent message was received before the latch was
configured.

PiperOrigin-RevId: 551050923
2023-07-25 18:01:49 -07:00
Janusz Sobczak c6d96b5971 Fix minor defects
Fixes use-after-free and NPE errors.

PiperOrigin-RevId: 551042892
2023-07-25 17:20:31 -07:00
Janusz Sobczak ae69b8ff4e Protect PendingPayload from use-after-free errors.
Protects against race conditions where a PendingPayload is destroyed when
another thread is still accessing it.

PiperOrigin-RevId: 550990038
2023-07-25 14:04:11 -07:00