Commit Graph
1862 Commits
Author SHA1 Message Date
hai007 df1831cfdf Add slot duration and ranging interval as new ranging capabilities and parameters.
PiperOrigin-RevId: 542637190
2023-06-22 12:38:27 -07:00
Anay Wadhera da678f5b55 Adjust device provider registration API to match NP expectations
PiperOrigin-RevId: 542634789
2023-06-22 12:29:47 -07:00
Guogang Li 4e5d91b970 Fixed the crash when handling keep alive packet
PiperOrigin-RevId: 542592058
2023-06-22 10:05:46 -07:00
Guogang Li bd30b11401 Fixed crash when stopping advertising
PiperOrigin-RevId: 542580849
2023-06-22 09:23:00 -07:00
Janusz Sobczak 3cf20ee3bc Store metadata in FastPairDevice
Add DeviceMetadata to FastPairDevice after downloading it.
It simplifies the code and prevents fetching the same metadata several times.
FastPairDataEncryptorImpl does not download the metadata anymore. Metadata
must have already been downloaded, otherwise we wouldn't know what FP protocol
to use.

PiperOrigin-RevId: 542490742
2023-06-22 01:48:56 -07:00
Eiden Kim f9123d544b Add send event to TransferUIEvent proto
PiperOrigin-RevId: 542466383
2023-06-21 23:26:48 -07:00
Qin Wang e4b12dbd80 Interface for passing HTTP Responses/Requests to observers
PiperOrigin-RevId: 542402792
2023-06-21 17:06:23 -07:00
Juliet Levesque 4d85bde8ce [Nearby Presence] Implement FakePresenceService::GetLocalPublicCredentials
Implements FakePresenceService::GetLocalPublicCredentials and exposes
FakePresenceService::SetLocalPublicCredentialsResult to configure results for
testing.
PiperOrigin-RevId: 542383663
2023-06-21 15:45:04 -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
Eiden Kim 5a2c972707 Add TransferUIEvent proto and adapter APIs for receiving
PiperOrigin-RevId: 542301885
2023-06-21 10:48:12 -07:00
Edwin Wu 05c707dd78 Add salt for hashing service_id in BLE packets.
PiperOrigin-RevId: 542118349
2023-06-20 19:45:20 -07:00
Aaron Yu 7eca4d74c6 Fix __FrameHandler3::CxxCallCatchBlock crashes at Nearby Connections layer
PiperOrigin-RevId: 542085514
2023-06-20 16:43:14 -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 b6a8802cb9 remove shared_ptr hack for std::function Runnable.
PiperOrigin-RevId: 541063821
2023-06-16 18:29:44 -07:00
Anay Wadhera 2a9bf7c883 Introduce connections authentication transport
PiperOrigin-RevId: 541057398
2023-06-16 17:55:06 -07:00
Nick Bourdakos 12f9512a19 Use IOS_LATEST for the test runner to prevent Xcode 14.3 issues
PiperOrigin-RevId: 541053739
2023-06-16 17:37:39 -07:00
Janusz Sobczak 20acd4eeb9 Add initial pairing in scalable seeker
PiperOrigin-RevId: 541034178
2023-06-16 16:14:14 -07:00
Janusz Sobczak 4914cbc2f9 Set FastPairDevice version
PiperOrigin-RevId: 541030067
2023-06-16 16:00:31 -07:00
Janusz Sobczak e46b19c798 Use the MAC address as peripheral name
We use BlePeirpheral::GetName()` as a mac address.

PiperOrigin-RevId: 541010558
2023-06-16 14:54:42 -07:00
Qin Wang 4b13033389 Add fast pair proto to third_party/nearby/fastpair
PiperOrigin-RevId: 540977348
2023-06-16 13:09:38 -07:00
Anay Wadhera 44fb9b4fa2 implement stoplisteningforincomingconnections
PiperOrigin-RevId: 540724954
2023-06-15 16:43:56 -07:00
Anthony Rueda c829632879 [Presence] Pass DeviceIdentityMetadata materials to PresenceDevice during advertisement decryption
PiperOrigin-RevId: 540715111
2023-06-15 16:00:50 -07:00
Anay Wadhera 5737b867ed implement startlisteningforincomingconnections
PiperOrigin-RevId: 540707703
2023-06-15 15:31:08 -07:00
Guogang Li 839dd086fd Fixed crash when initializing Bluetooth watcher
PiperOrigin-RevId: 540650297
2023-06-15 12:02:49 -07:00
hai007 b5f1added4 Adding components for binding the C++ libraries with flutter app
- Branch class Listener from google3/location/nearby/cpp/sharing/clients/dart/platform/lib/listener.dart for further use of listening the change from notification controller.
- Create Device Metadata to store the device information relating to UI showing.
- Create binding class to bind C++ libraries to dart language.

PiperOrigin-RevId: 540644654
2023-06-15 11:44:11 -07:00
Juliet Levesque aee56f0729 [Nearby Connections] Add CancellationFlag::Uncancel
Add CancellationFlag::Uncancel and on calls to ClientProxy::AddCancellationFlag, if a flag is already in the map, uncancel it. This will address the case when users use NC to share/receive a file, then cancel in the middle because the wrong file was selected, and  then re-do right after. Without this change, the second share/receive process will be seen as cancelled with cancellation flags enabled. However this change will uncancel the flag which is added in RequestConnection and OnConnectionInitiated in the NS flow.

PiperOrigin-RevId: 540633470
2023-06-15 11:07:44 -07:00
Eiden Kim a547d47274 Add NewSendDesktopNotification to analytics recorder
PiperOrigin-RevId: 540626567
2023-06-15 10:44:58 -07:00
hai007 ebe02e1174 Allow auto-resume the payload transfer when disconnection
PiperOrigin-RevId: 540438831
2023-06-14 18:35:04 -07:00
Guogang Li 0c1d5e7e23 Applied flags to Wi-Fi Hotspot parameters
PiperOrigin-RevId: 540432082
2023-06-14 18:00:52 -07:00
Anay Wadhera a25ef756e7 Isolate ble_v2/wifi_lan on incoming connection logic
PiperOrigin-RevId: 540420565
2023-06-14 17:02:25 -07:00
hai007 87fd2f130a Remove redundant design of fast pair wrapper.
PiperOrigin-RevId: 540410011
2023-06-14 16:18:48 -07:00
Anay Wadhera cf9170ba16 Isolate Ble accept handler logic
PiperOrigin-RevId: 540401997
2023-06-14 15:47:43 -07:00
Anay Wadhera 169087dc96 convert bluetooth connection handler to a front binder
PiperOrigin-RevId: 540355517
2023-06-14 13:00:33 -07:00
hai007 efb0fd9a0a Update Tachyon protos to allow Messaging APIs to be callable.
PiperOrigin-RevId: 540336655
2023-06-14 11:49:13 -07:00
Guogang Li f05bf7fc40 Fixed transfer sync issue in payload callback
PiperOrigin-RevId: 540333269
2023-06-14 11:37:45 -07:00
Anay Wadhera cf8afb73aa Use alphanumeric characters for PresenceDevice endpoint id generation
PiperOrigin-RevId: 540321021
2023-06-14 10:59:49 -07:00
Guogang Li 2c90a61fca Fixed crash when flag update in peripheral tracker
PiperOrigin-RevId: 540294615
2023-06-14 09:35:47 -07:00
Guogang Li 5ae556499b Fixed the deadlock issue in hotspot
PiperOrigin-RevId: 540283852
2023-06-14 08:52:59 -07:00
Janusz Sobczak c4139c83b0 Use RobustGattClient
PiperOrigin-RevId: 540060033
2023-06-13 13:42:19 -07:00
Qin Wang e20fb4f75d Add screen locked listener for fast pair windows
PiperOrigin-RevId: 540038338
2023-06-13 12:26:20 -07:00
hai007 00ab9fef62 Load the AccountManager in the WebRTC code.
PiperOrigin-RevId: 540036925
2023-06-13 12:20:28 -07:00
Anay Wadhera e0674d435e Implement signing/verification of PresenceAuthenticationFrames
PiperOrigin-RevId: 540029386
2023-06-13 11:53:15 -07:00
hai007 5efbbe4a40 Connect UI related key services in mediator to flutter app. The whole fast pair libraries are in C++ language while flutter app is in dart language. That is, the purpose of adapter is connecting dart (flutter app) and c++ (Fast Pair libraries).
PiperOrigin-RevId: 540013256
2023-06-13 10:58:48 -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
Janusz Sobczak ca60afa007 Add robust gatt client
PiperOrigin-RevId: 539817203
2023-06-12 18:29:59 -07:00
hai007 5aeceb2034 Update path to LDT dependency
PiperOrigin-RevId: 539811031
2023-06-12 17:58:12 -07:00
Janusz Sobczak 4f73e87a6f Improve device lost handling
Handle the error case when the platform calls device_lost_cb without calling device_discovered_cb first.

PiperOrigin-RevId: 539791976
2023-06-12 16:28:01 -07:00
Juliet Levesque 6f69e97421 [Nearby Connections] Stop 3 AttemptsToConnect over BluetoothClassic for CancellationFlag
CancellationFlags will be used to prevent crashes during the shutdown of Nearby Connections from pending tasks taking too long during the shutdown period. By using CancellationFlags, we can prevent the retries occuring during the Shutdown by short-circuiting an in flight AttemptToConnect, and checking for Cancellation before retries.

Because BluetoothClassic does not use futures, the short circuit only requires a check after ConnectToService, and returning an empty
socket.

PiperOrigin-RevId: 539755631
2023-06-12 14:05:36 -07:00
Juliet Levesque 240159e872 [Nearby Connections] Stop 3 AttemptsToConnect over WebRTC for CancellationFlag
CancellationFlags will be used to prevent crashes during the shutdown of Nearby Connections from pending tasks taking too long during the shutdown period. WebRTC using 3 x 10s retries to connect, which means we are potentially waiting for 30 seconds of retries to execute during shutdown (which is longer than the 10s duration alloted for Core shutdown).

By using CancellationFlags, we can prevent the retries occuring during the Shutdown by short-circuiting an in flight AttemptToConnect, and checking for Cancellation before retries.

PiperOrigin-RevId: 539690403
2023-06-12 10:16:36 -07:00
hai007 39e54e8a0c Automated visibility attribute cleanup.
PiperOrigin-RevId: 539527095
2023-06-11 20:09:41 -07:00