Commit Graph
1292 Commits
Author SHA1 Message Date
Guogang Li d3eaae1015 list IP addresses in priority
PiperOrigin-RevId: 503310798
2023-01-19 17:47:27 -08:00
Nick Bourdakos 819f816600 Refactor nearby connections clients to be organized by languages.
PiperOrigin-RevId: 503308736
2023-01-19 17:36:07 -08:00
Eiden Kim 26c752dac5 Fix folder transfer with non-English folders.
PiperOrigin-RevId: 503235989
2023-01-19 12:33:14 -08:00
hai007 6dc37d460f Adding Anti Spoofing Key Pair into Device in proto.
PiperOrigin-RevId: 503214302
2023-01-19 11:12:17 -08:00
Guogang Li 70412b8e3c Fixed the crash when checking IP addresses
PiperOrigin-RevId: 503048520
2023-01-18 20:14:45 -08:00
Janusz Sobczak a29be214a3 Migrate to absl::AnyInvocable in NP.
Replaces a bunch of std::function uses with absl::AnyInvocable.

PiperOrigin-RevId: 502960326
2023-01-18 13:16:29 -08:00
hai007 9a22f71a54 Remove PayLoad::AsBytes()&& to fix -Wreturn-stack-address error
With never versions of libc++, Chromium builds would fail with:

  ../../third_party/nearby/src/connections/payload.cc:105:50:
  error: returning reference to local temporary object [-Werror,-Wreturn-stack-address]
      return result ? std::move(*result) : std::move(ByteArray());
                                                     ^~~~~~~~~~~

Before this libc++ version, the error was masked by the std::move.

If I understand correctly, the only user of this function was
BytesInternalPayload::DetachNextChunk() which was going to make a copy of the
ByteArray annyways, so it might as well use the AsBytes() overload that returns
a const ref.

See also https://crbug.com/1407615#c2

PiperOrigin-RevId: 502946204
2023-01-18 12:21:22 -08:00
Qin Wang afb76ee45c Refactor Crypto Library
PiperOrigin-RevId: 502942033
2023-01-18 12:05:01 -08:00
Eiden Kim df6e8d951f Update custom path log to show correct path
PiperOrigin-RevId: 502765322
2023-01-17 21:01:51 -08:00
Eiden Kim d9b4985c76 Update custom path log to show correct path
PiperOrigin-RevId: 502735941
2023-01-17 17:55:26 -08:00
Qin Wang 2330739b90 Migrate TaskRunner from location/nearby to third_party/nearby
PiperOrigin-RevId: 502733409
2023-01-17 17:40:55 -08:00
Guogang Li cec229c2f3 Enable connection timeout feature
PiperOrigin-RevId: 502701814
2023-01-17 15:16:54 -08:00
Janusz Sobczak ca547df4d7 Subscribe for public credentials update
Nearby Presence scanning sessions may be very long. We need a way to notify the scanner that new credentials were added during scanning.
`SubscribeForPublicCredentials()` allows us to subscribe for such updates.

PiperOrigin-RevId: 502699345
2023-01-17 15:07:14 -08:00
Guogang Li 79834a0ee0 Reduce IP check interval and put more logs for Wi-Fi hotspot
PiperOrigin-RevId: 502698293
2023-01-17 15:04:01 -08:00
hai007 ea3fa0e392 Fix a bug in which an iterator is compared to an end iterator from a different hashtable.
PiperOrigin-RevId: 502652950
2023-01-17 12:10:15 -08:00
hai007 589829f947 Create a downloader class to trigger downloading and deal with the success and failure status.
PiperOrigin-RevId: 501961621
2023-01-13 16:12:52 -08:00
Anay Wadhera 44fb63f498 Use CredentialSelector for GenerateCredentials()
PiperOrigin-RevId: 501951868
2023-01-13 15:23:35 -08:00
hai007 ac87d5cf50 Explicitly initialize atomic value.
PiperOrigin-RevId: 501936581
2023-01-13 14:16:03 -08:00
hai007 dab0ead924 Explicitly initialize atomic value; change its type to unsigned.
PiperOrigin-RevId: 501935970
2023-01-13 14:12:44 -08:00
Qin Wang f94aa7548b Migrate Timer from location/nearby to third_party/nearby
PiperOrigin-RevId: 501928835
2023-01-13 13:44:17 -08:00
hai007 868e42f5f2 Fix a bug in which an iterator is compared to an end iterator from a different hashtable.
PiperOrigin-RevId: 501928248
2023-01-13 13:40:47 -08:00
Janusz Sobczak 0e2111afc2 Collapse success&failure callbacks into one
Instead of two callbacks:
- void on_success(Result result)
- void on_failure(Status status)
use just one callback:
void on_result(StatusOr<Result> result)

PiperOrigin-RevId: 501912034
2023-01-13 12:28:47 -08:00
hai007 454d22b19a Adding factory for creating FastPairMetadataRepository instances to increase the flexibility. The unit test for the FastPairMetadataRepositoryFactory will be involved when it is called.
PiperOrigin-RevId: 501682263
2023-01-12 15:28:42 -08:00
Qin Wang 7eeea7a283 Implement ECDH and AES Encryption/ Decryption for Fast Pair Windows
PiperOrigin-RevId: 501666600
2023-01-12 14:25:57 -08:00
Qin Wang bde4a780c6 DataParser advertisement for Model Id
PiperOrigin-RevId: 501643615
2023-01-12 13:00:10 -08:00
Anay Wadhera 7667420e2b Use CredentialSelector for GenerateCredentials()
PiperOrigin-RevId: 501622339
2023-01-12 11:36:37 -08:00
Janusz Sobczak 4fc1583b94 Migrate to absl::AnyInvocable
PiperOrigin-RevId: 501392167
2023-01-11 15:19:33 -08:00
John Carroll 3be5844fc3 Fixed the order of #include's fixes, a subtle but present bug.
PiperOrigin-RevId: 501360403
2023-01-11 13:16:19 -08:00
hai007 d9f113e6e1 Disable WEB_RTC for Windows Platform
PiperOrigin-RevId: 501346561
2023-01-11 12:19:53 -08:00
Guogang Li e261be1a16 Enable Bluetooth connection status track
PiperOrigin-RevId: 501334205
2023-01-11 11:31:27 -08:00
Guogang Li 5326cec7ab Fixed variable initialization issue in atomic_boolean
PiperOrigin-RevId: 501327583
2023-01-11 11:06:14 -08:00
hai007 7a9916f726 Fix WifiDirect small logic error
PiperOrigin-RevId: 501309880
2023-01-11 10:00:28 -08:00
Copybara-Service b246cb57a7 Merge pull request #1205 from bourdakos1:duplicate-proto
PiperOrigin-RevId: 501091027
2023-01-10 14:16:06 -08:00
Nick Bourdakos e5fce1e630 Remove .DS_Store 2023-01-10 16:49:36 -05:00
Nick Bourdakos d042055607 Update Package.swift 2023-01-10 16:48:24 -05:00
Nick Bourdakos ea8a1ed737 Copy implemenation protos into cpp folder so clients can be refactored 2023-01-10 16:48:24 -05:00
Guogang Li cf54a0fdb6 Set thread shutdown to false by default in Windows implementation
PiperOrigin-RevId: 501082672
2023-01-10 13:41:28 -08:00
hai007 2f8ecbe610 Fix a bug in which an iterator is compared to an end iterator from a different hashtable.
PiperOrigin-RevId: 501007094
2023-01-10 08:54:57 -08:00
Nick Bourdakos 8cde6b1bd3 Internal change
PiperOrigin-RevId: 500848005
2023-01-09 17:28:08 -08:00
Nick Bourdakos 412548248c Update to c++17
PiperOrigin-RevId: 500830077
2023-01-09 16:02:02 -08:00
Guogang Li 350e76e690 Add flag to control connection timeout feature
PiperOrigin-RevId: 500822176
2023-01-09 15:26:59 -08:00
Qin Wang 0d58411896 Remove bluetooth_address from location/nearby/cpp/fastpair and third_party/nearby/fastpair
PiperOrigin-RevId: 500821521
2023-01-09 15:23:38 -08:00
Qin Wang e90fd77e47 Migrate bluetooth_address from location/nearby to third_party/nearby
PiperOrigin-RevId: 500784376
2023-01-09 12:49:52 -08:00
Eiden Kim 6ac239688f Rollback for cl/499340098 - remove DebugString() log
PiperOrigin-RevId: 500772955
2023-01-09 12:01:30 -08:00
Nick Bourdakos 73a4c4210d Internal change
PiperOrigin-RevId: 500765032
2023-01-09 11:28:50 -08:00
John Carroll a024710c58 Added an exported function to enable/disable ble v3 from the dart UI including updating the UI. This is expected to be used in test and does not affect interfaces that are unaware of it (IOW, it breaks nothing and NS will still use v2). Now we can just switch back and forth between v2 and v3 without recompilation, but, it needs to be done carefully, once it's toggled toggling back should only be done when not advertising, discovering, or connected/ing. At some point, I will work out the logic for disabling it, it's gonna take a little dart coding.
PiperOrigin-RevId: 500748215
2023-01-09 10:27:41 -08:00
hai007 e156d93f80 Add in an ultra_low_power
PiperOrigin-RevId: 500718740
2023-01-09 08:23:59 -08:00
Nick Bourdakos ceaf607264 Add test for ensuring no main symbols in SPM packages.
PiperOrigin-RevId: 500568078
2023-01-08 14:59:18 -08:00
Qin Wang d9b6897189 Remove observer_list.h from location/nearby/cpp/fastpair and third_party/nearby/fastpair
PiperOrigin-RevId: 500331550
2023-01-06 22:21:04 -08:00
hai007 22c6db1473 Adding the implementation of the windows controller and cross language interfaces. TODO: Unit test needs to be added after the prototyped finished (b/264707418)
PiperOrigin-RevId: 500274314
2023-01-06 22:19:46 -08:00