Commit Graph
210 Commits
Author SHA1 Message Date
Janusz Sobczak b9efeaa881 Update SharedCredential definition
PiperOrigin-RevId: 506117150
2023-02-03 16:34:34 -08:00
hai007 1c19d52f29 Limit log spam from Analytics Recorder.
PiperOrigin-RevId: 506722936
2023-02-02 14:26:35 -08:00
Janusz Sobczak 270aad8ca8 Fix use-after-free defect
PiperOrigin-RevId: 506477039
2023-02-01 18:15:38 -08:00
Nick Bourdakos 9fef440925 Update Dart payload callbacks to better support file and byte payloads
PiperOrigin-RevId: 506006910
2023-01-31 08:15:55 -08:00
Nick Bourdakos 20989c5167 Internal change
PiperOrigin-RevId: 504972306
2023-01-26 16:36:14 -08:00
Qin Wang ed9890957f Upgrade minimum_os_version to 13.0
PiperOrigin-RevId: 504597125
2023-01-25 10:23:19 -08:00
Janusz Sobczak f4d85f9b90 Migrate to AnyInvocable in platform code
PiperOrigin-RevId: 504104740
2023-01-23 16:04:21 -08:00
hai007 7f34968b78 Add Units Test for P2pPointToPointPcpHandler
PiperOrigin-RevId: 504064711
2023-01-23 13:20:11 -08:00
Nick Bourdakos f49fe2fb59 Internal change
PiperOrigin-RevId: 503320554
2023-01-19 18:45:56 -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
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
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
Janusz Sobczak 4fc1583b94 Migrate to absl::AnyInvocable
PiperOrigin-RevId: 501392167
2023-01-11 15:19:33 -08:00
hai007 7a9916f726 Fix WifiDirect small logic error
PiperOrigin-RevId: 501309880
2023-01-11 10:00:28 -08:00
Nick Bourdakos 8cde6b1bd3 Internal change
PiperOrigin-RevId: 500848005
2023-01-09 17:28:08 -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
Nick Bourdakos ceaf607264 Add test for ensuring no main symbols in SPM packages.
PiperOrigin-RevId: 500568078
2023-01-08 14:59:18 -08:00
hai007 32ace29ccf Change wifi_hotspot_credential.h to wifi_credential.h
PiperOrigin-RevId: 500223301
2023-01-06 15:05:22 -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 f7f0a266fe WIFI Direct implementation (5)
Part 5: Add WifiDirect Server/Client Socket and Credential

PiperOrigin-RevId: 499401159
2023-01-03 23:10:15 -08:00
Eiden Kim 871e0d2e62 Add a debug log for payload processing error
PiperOrigin-RevId: 499340098
2023-01-03 16:19:37 -08:00
Guogang Li 2cee171493 Fixed random crashes during transfer
PiperOrigin-RevId: 499329220
2023-01-03 15:24:03 -08:00
hai007 0173ad3e1b Automated visibility attribute cleanup.
PiperOrigin-RevId: 498561519
2022-12-30 04:14:34 -08:00
hai007 f772614a46 Automated visibility attribute cleanup.
PiperOrigin-RevId: 498310370
2022-12-28 21:46:22 -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
Nick Bourdakos 07998a05ed Change "ios" package name to "apple" since its usage isn't limited to iOS
PiperOrigin-RevId: 497046967
2022-12-21 18:09:42 -08:00
hai007 c3c9a7ffc9 Extend endpoint disconnection timeout.
This extends the endpoint disconnection timeout to be slightly longer than the WebRTC connection attempt timeout. This allows an in-progress bandwidth upgrade to resolve before we clean up the endpoint.

Failing to properly clean up the bandwidth upgrade can lead to a delay when shutting down Nearby Connections and can crash the process instead of allowing a clean shutdown.

PiperOrigin-RevId: 496750001
2022-12-20 14:18:59 -08:00
Nick Bourdakos 682813388f Disable WebRTC for ARM based CPUs
PiperOrigin-RevId: 495707681
2022-12-15 15:15:00 -08:00
hai007 255c2672ea Internal cleanup.
PiperOrigin-RevId: 495138142
2022-12-13 15:11:48 -08:00
Anay Wadhera 82b2c63a7c Implement BleConnectionInfo as a container for BLE mac address.
Move PresenceDevice to use BleConnectionInfo.

PiperOrigin-RevId: 494023973
2022-12-08 16:24:00 -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
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
Aaron Yu 49af1a96b6 Add SetCustomSavePath API to Nearby Connections
PiperOrigin-RevId: 492563503
2022-12-02 14:38:55 -08:00
Guogang Li 1c32c738fb Call BWU callback after medium connection initiated
PiperOrigin-RevId: 491949519
2022-11-30 10:06:19 -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
hai007 2012acdbcc Change BWU priority from Hotspot to WifiLan
PiperOrigin-RevId: 491388299
2022-11-28 10:55:28 -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 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
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
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
Nick Bourdakos e58dd0a597 Add parentFolder, fileName and totalSize to GNCFilePayload.
PiperOrigin-RevId: 489303089
2022-11-17 14:08:40 -08:00