Commit Graph
1179 Commits
Author SHA1 Message Date
Janusz Sobczak 5ce2485694 Replace .proto.h with .pb.h
We should be using public .pb.h files

PiperOrigin-RevId: 494011872
2022-12-08 15:32:02 -08:00
Janusz Sobczak a92abac83a Update advertisement encoder/decoder
1. Update the API to accept the credentials on input instead of credential manager.
2. Update the test with values using the LDT encryption.

These changes allow us to have a more asynchronous implementaion.
When broadcasting we can:
1. Fetch the private credentials asynchronously.
2. Create the advertisement and start broadcasting when the credentials have been fetched.

When scanning we can:
1. Fetch public credentials asynchronously.
2. Start scanning for advertisements.
3. Update the decoder when new credentials are fetched.

PiperOrigin-RevId: 493998041
2022-12-08 14:36:44 -08:00
Suet-Fei Li a8ca18f477 Internal refactor.
PiperOrigin-RevId: 493970269
2022-12-08 12:47:57 -08:00
hai007 fcfec33a7c Clarify BWU retry method name and fix a small logic error
PiperOrigin-RevId: 493936270
2022-12-08 10:45:08 -08:00
Suet-Fei Li 9f9bd40ada Internal flow.
PiperOrigin-RevId: 493719005
2022-12-07 15:05:45 -08:00
Suet-Fei Li 89a52723c6 Internal flow.
PiperOrigin-RevId: 493701400
2022-12-07 14:00:33 -08:00
Anay Wadhera 43b099a5d2 Include missing mutex.h for Android
PiperOrigin-RevId: 493676427
2022-12-07 12:27:40 -08:00
Anay Wadhera db4d0744a3 Drop base/check.h include for chrome
PiperOrigin-RevId: 493432083
2022-12-06 15:43:45 -08:00
Guogang Li 43fab95a3a Refactor Wi-Fi discovery
PiperOrigin-RevId: 493417873
2022-12-06 14:47:34 -08:00
Aaron Yu 4762d1e3ee Add parent_folder support for custom save path
PiperOrigin-RevId: 493415518
2022-12-06 14:39:07 -08:00
hai007 fa7c8a2ec8 WIFI Direct implementation (2)
Part 2: Connection common code for WIFI Direct

PiperOrigin-RevId: 493153750
2022-12-05 17:14:26 -08:00
Anay Wadhera 87c57534a4 Include check.h header to fix Github presence build
PiperOrigin-RevId: 493067786
2022-12-05 11:43:05 -08:00
Qin Wang ba1578777d Implement Bluetooth Pairing for Fast Pair Windows
PiperOrigin-RevId: 492902580
2022-12-04 21:05:47 -08:00
Guogang Li da4ac95e82 Check connectivity before report Wi-Fi discovery
PiperOrigin-RevId: 492570605
2022-12-02 15:10:31 -08:00
Aaron Yu 49af1a96b6 Add SetCustomSavePath API to Nearby Connections
PiperOrigin-RevId: 492563503
2022-12-02 14:38:55 -08:00
Anay Wadhera 2273c87b57 Implement WifiLanConnectionInfo for mDNS IPV4/IPV6 discovery.
PiperOrigin-RevId: 492320076
2022-12-01 15:51:24 -08:00
Anay Wadhera 40e391b33d Explicitly convert absl::string_view to std::string
PiperOrigin-RevId: 492260785
2022-12-01 12:01:09 -08:00
Janusz Sobczak 3aa109a29b Add NoDeviceFoundAfterStopScan test
PiperOrigin-RevId: 492260183
2022-12-01 11:57:13 -08:00
Anay Wadhera 109458b7ad Add missing header to service_controller.h
PiperOrigin-RevId: 492193352
2022-12-01 07:44:48 -08:00
Janusz Sobczak 255bdb6139 Add StopScan method.
Add StopScan and refactor StartScan to return a sesssion id.
Move handling of StartScan, StopScan and NotifyFoundBle to the same thread to avoid race conditions.
Implement start advertising in service controller.

PiperOrigin-RevId: 492016697
2022-11-30 14:21:26 -08:00
Anay Wadhera 50de23b42c Force bluetooth connection info mac address to be 6 bytes.
PiperOrigin-RevId: 491977342
2022-11-30 11:48:12 -08:00
Anay Wadhera fb544f7900 Add missing headers to service_controller_impl.h to fix Chrome
PiperOrigin-RevId: 491969884
2022-11-30 11:17:49 -08:00
Guogang Li 1c32c738fb Call BWU callback after medium connection initiated
PiperOrigin-RevId: 491949519
2022-11-30 10:06:19 -08:00
Janusz Sobczak e44f7eac61 Aynchronous start and stop broadcast
PiperOrigin-RevId: 491772964
2022-11-29 16:59:41 -08:00
Janusz Sobczak f0d36f8d8d Add StopBroadcast
Use explicit StopBroadcast API instead of a callback in BoroadcastSession.

PiperOrigin-RevId: 491759852
2022-11-29 16:00:28 -08:00
Anay Wadhera b7415ecd40 Implement NearbyDevice for PresenceDevice.
PiperOrigin-RevId: 491705794
2022-11-29 12:19:47 -08:00
hai007 82f35a1401 Add "PayloadDirection" as an extra index for a payload's ThroughputRecorder
PiperOrigin-RevId: 491516038
2022-11-28 20:48:52 -08:00
Hai Shang 6871b9d5a6 Add initial impl for UpdateRemotePublicCredentials in CredentialManager.
PiperOrigin-RevId: 491458184
2022-11-28 15:24:26 -08:00
Janusz Sobczak 0cb5b004e4 Add more Rand helper methods
PiperOrigin-RevId: 491409479
2022-11-28 12:14:19 -08:00
hai007 2012acdbcc Change BWU priority from Hotspot to WifiLan
PiperOrigin-RevId: 491388299
2022-11-28 10:55:28 -08:00
Qin Wang 00b1a1570e Implement FastPairScanner
PiperOrigin-RevId: 490621670
2022-11-23 18:10:43 -08:00
hai007 88d5cb9fdd Support multiple simultaneous server sockets for WLAN
PiperOrigin-RevId: 490596563
2022-11-23 15:31:38 -08:00
Janusz Sobczak 8bd3d34580 Link with Rust NP LDT
Add conditional dependency on Rust NP LDT.
By default, we will use an empty stub.

PiperOrigin-RevId: 490554102
2022-11-23 11:55:52 -08:00
hai007 9425ba7fd6 Add Try/Catch for Hotspot methods
PiperOrigin-RevId: 490397928
2022-11-22 20:14:19 -08:00
hai007 439c10ff01 Add clearcut logging for getReachablePhoneNumbers: track calling listReachablePhoneNumbers from clients.
PiperOrigin-RevId: 490395415
2022-11-22 19:58:47 -08:00
Anay Wadhera 52d81710a2 Add fields to PresenceDevice
PiperOrigin-RevId: 490345719
2022-11-22 15:03:09 -08:00
Guogang Li c499d18af6 Parse remote device IP address from text attributes first
PiperOrigin-RevId: 490324278
2022-11-22 13:37:21 -08:00
Nick Bourdakos defd5e03e7 Add Advertiser and Discoverer to the Swift layer
PiperOrigin-RevId: 490301361
2022-11-22 12:07:16 -08:00
Nick Bourdakos 808611f316 Add connection manager to Swift layer
PiperOrigin-RevId: 490288395
2022-11-22 11:20:27 -08:00
Janusz Sobczak 9e61866ee3 Sync with Rust LDT changes
PiperOrigin-RevId: 490288278
2022-11-22 11:16:21 -08:00
Janusz Sobczak a3b6058753 Fully qualify ::location::nearby imports.
Find and replace exercise.
Replace
`using location::nearby`
with
`using ::location::nearby`
and
`using <Name> = location::nearby`
with
`using <Name> = ::location::nearby`

PiperOrigin-RevId: 490087051
2022-11-21 15:33:21 -08:00
Anay Wadhera 39d3ef1a7c Move PresenceDevice to use DeviceMotion
DeviceMotion has the same attributes, let's use that instead.

PiperOrigin-RevId: 490084783
2022-11-21 15:25:37 -08:00
Anay Wadhera 8679d3a370 Move CancellationFlag to absl::AnyInvocable
PiperOrigin-RevId: 490078293
2022-11-21 14:56:55 -08:00
Adam Cozzette b1d1019541 Internal change
PiperOrigin-RevId: 489671461
2022-11-19 05:04:29 -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 49d47d8e16 Fix dependency between PresenceClient and PresenceService
Give PresenceClient a borrowable reference to PresenceService. Benefits:
1. PresenceClient can verify if PresenceService is alive before trying to access it.
2. The calls to PresenceService are serialized.
3. PresenceService will not be destroyed while a PresenceClient is using it.

PiperOrigin-RevId: 489590767
2022-11-18 16:52:35 -08:00
Janusz Sobczak a11733988f Implement start advertising in service controller.
PiperOrigin-RevId: 489584407
2022-11-18 16:17:55 -08:00
hai007 d4551b7187 Add MCC Mode
PiperOrigin-RevId: 489580605
2022-11-18 15:58:41 -08:00
Nick Bourdakos 9020f528ff Start adding basic types for the Swift layer
PiperOrigin-RevId: 489559926
2022-11-18 14:17:49 -08:00
Nick Bourdakos fcacb61b7c Add internal delegates to Swift layer
PiperOrigin-RevId: 489473346
2022-11-18 07:50:38 -08:00