Commit Graph
811 Commits
Author SHA1 Message Date
hai007 d09f53a40b Unit test for WIFI Hotspot in BWU layer
PiperOrigin-RevId: 445437919
2022-04-29 09:29:59 -07:00
hai007 aeff3a9683 Change build target visibility for testing.
PiperOrigin-RevId: 445051381
2022-04-27 21:28:29 -07:00
hai007 8e80ee097a Unit test for WIFI Hotspot in Connection Medium layer
Fix 230126796: go/tsan error (data_race) found while running //third_party/nearby/internal/platform:public_test

PiperOrigin-RevId: 444788086
2022-04-27 01:21:23 -07:00
bourdakos f5860da8f1 Fix README markdown typos
PiperOrigin-RevId: 444316326
2022-04-25 11:00:02 -07:00
suetfei cf85f26583 Merge pull request #612 from bourdakos1/github-actions
Add GitHub action for testing swift package
2022-04-25 10:29:52 -07:00
Nick Bourdakos c15fba9631 Checkout with submodules 2022-04-22 16:41:07 -04:00
Nick Bourdakos 8227416d73 Add GitHub action for testing swift package 2022-04-22 16:41:07 -04:00
bourdakos 9a362bb9ae Exclude tests from swift build
PiperOrigin-RevId: 443746991
2022-04-22 13:39:46 -07:00
bourdakos ff7a662bf6 Add SPM build test
PiperOrigin-RevId: 443726660
2022-04-22 12:13:01 -07:00
bourdakos da13735484 Update Package.swift and stub webrtc
PiperOrigin-RevId: 443722630
2022-04-22 11:57:15 -07:00
hai007 ec2d3ae1aa WIFI Hotspot implementation (4)
Part 4: BWU and client interface part

PiperOrigin-RevId: 443700883
2022-04-22 10:32:12 -07:00
hai007 60e896ad37 Implementation g3 medium/Environment/platform layer unit test for WIFI Hotspot
PiperOrigin-RevId: 443304661
2022-04-21 01:09:38 -07:00
jfcarroll 6fc5b64605 Flattening payload and listeners
PiperOrigin-RevId: 443168939
2022-04-20 12:55:23 -07:00
hai007 86911dc5a9 Internal comment.
PiperOrigin-RevId: 442646111
2022-04-18 15:25:10 -07:00
nohle 53a1d13496 [NC] Remove spammy AnalyticsRecorder log
If the platform (e.g., ChromeOS) doesn't provide an EventLogger, this WARNING is logged for nearly every Nearby Connections method.

PiperOrigin-RevId: 442539723
2022-04-18 07:42:45 -07:00
nohle 0c19f3f279 [NC] Track bandwidth upgrade mediums for each endpoint (fix)
Rename RevertInitiatedBwuMediumForEndpointIfNecessary to RevertBwuMediumForEndpoint because this method can be called by RESPONDERs of the bandwidth upgrade request. Also, make sure to remove the endpoint from the endpoint-to-medium map.

PiperOrigin-RevId: 442055611
2022-04-15 11:13:27 -07:00
nohle 98a5b9d0ee [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (4/4 unit tests)
Add unit tests for BaseBwuHandler and BwuManager (BWU initiation only). Add fake classes and helper methods needed for testing. Refine comments and logs.

PiperOrigin-RevId: 442021842
2022-04-15 08:33:21 -07:00
nohle e5fb3a8f11 [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (3/4)
* Fix bandwidth upgrade service ID usage. For instance, no longer use the inaccurate service ID from ClientProxy.
* Add more fine-grained upgraded endpoint tracking using both service IDs and endpoint IDs
* Only "revert" bandwidth-upgrade mediums--for example, stop accepting connections on a server socket--for a service when the last endpoint for that service is finished.

These changes are necessary to support multiple services (e.g., Nearby Share and Phone Hub) and multiple mediums (e.g., WebRTC and WLAN).

PiperOrigin-RevId: 442021257
2022-04-15 08:29:41 -07:00
nohle dee3e9cfb4 [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (2/4)
Consolidate BWU service ID bookkeeping into the BaseBwuHandler class. This eliminates duplicated code in per-medium BWU handlers and allows us to easily augment the bookkeeping with endpoint IDs in a subsequent CL.

Also, localize all service ID wrapping to the BaseBwuHandler class. A postfix is appended to the service ID during bandwidth upgrade, e.g., "NearbyShare_INITIATOR_BWU"; this is done to distinguish a medium's use for advertising/discovery vs. its use for device-to-device connections.

This CL should theoretically be a no-op, but per-medium BWU handlers were inconsistent in their implementations.

PiperOrigin-RevId: 442019603
2022-04-15 08:19:19 -07:00
nohle 463d391fcd [Nearby Connections][C++] Track bandwidth upgrade mediums for each endpoint (1/4)
This CL should be a no-op.

Provide better access to the service ID during bandwidth upgrade handling. Notably, 1) have the endpoint channel store its associated service ID, and 2) send the service ID on a connect/disconnect.

The service ID identifies the application, for example, "NearbySharing". In future CLs, we will use the service IDs to better handle bandwidth-upgrade bookkeeping when multiple services are running simultaneously. Specifically, we will better handle reverting a bandwidth-upgrade medium without interfering with other services.

PiperOrigin-RevId: 442019209
2022-04-15 08:15:53 -07:00
jgsobczak 940dba6568 Merge pull request #600 from google/embedded
Add embedded SDK
2022-04-14 13:14:48 -07:00
hai007 93f203dc0b WIFI Hotspot implementation (3)
Part 3: WIFI Hotspot platform code for Windows

PiperOrigin-RevId: 441826092
2022-04-14 12:31:07 -07:00
Janusz Sobczak daac1e01c8 Add embedded SDK
The first release, v1.0.0-embedded, of Nearby SDK for embedded devices.
2022-04-14 11:57:25 -07:00
hai007 bc01739580 Add test to exclude list
PiperOrigin-RevId: 441810605
2022-04-14 11:24:54 -07:00
hai007 8d8876249d BUILD configuration change
PiperOrigin-RevId: 441796698
2022-04-14 10:32:16 -07:00
jgsobczak 0ffd8ec9b6 Merge pull request #596 from google/revert-593-embedded
Revert "Add gtest submodule"
2022-04-14 10:14:12 -07:00
jgsobczak 3a58f7facd Revert "Add gtest submodule" 2022-04-14 10:13:53 -07:00
eidenkim 3f81504dc1 Nearby Connections - Fixed crash when starting the app on devices with no Bluetooth adapter
PiperOrigin-RevId: 441773811
2022-04-14 08:59:23 -07:00
edwinwu d1b2437b0d [BLE Refactor] Implements BleExtraField in mediums::BleAdvertisement for Extended advertisement.
PiperOrigin-RevId: 441665698
2022-04-13 22:06:57 -07:00
jgsobczak f8dbc648b5 Merge pull request #593 from google/embedded
Add gtest submodule
2022-04-13 16:53:16 -07:00
Janusz Sobczak 06a63f9e28 Add gtest submodule 2022-04-13 13:52:49 -07:00
hai007 5240c016e0 Fix swift build
PiperOrigin-RevId: 441530856
2022-04-13 11:18:37 -07:00
hai007 530a6faeca Change copts include patch from relative path to full path for "impl_test"
PiperOrigin-RevId: 441529218
2022-04-13 11:13:00 -07:00
edwinwu 3050f9432c [BLE Refactor] Implements DiscoveredPeripheralTracker.
PiperOrigin-RevId: 441524475
2022-04-13 10:56:16 -07:00
edwinwu 3aa6b2f175 Fixes the package_swift exclude folder for iOS.
PiperOrigin-RevId: 441379967
2022-04-12 22:20:46 -07:00
hai007 ae813b51d3 [Sharing] Add QuickSetting tile into ActivityName.
PiperOrigin-RevId: 441072655
2022-04-11 20:45:42 -07:00
jfcarroll 2dca231337 This fixes the memory issues in bluetooth_adapter.cc
PiperOrigin-RevId: 441012332
2022-04-11 15:30:06 -07:00
hai007 5ef871fda1 Add wifi_lan_test to exclude list
PiperOrigin-RevId: 440958077
2022-04-11 12:01:39 -07:00
hai007 096a627bfc Fix the wrong file in a previous commit
PiperOrigin-RevId: 440932517
2022-04-11 10:39:13 -07:00
hai007 1016ce4167 Update swift package to reflect a file name change.
PiperOrigin-RevId: 440922827
2022-04-11 10:06:17 -07:00
edwinwu a6f4bb9c04 [iOS NC] LSC: Separate third_party/nearby/internal/platform/implementation/ios to
- third_party/nearby/internal/platform/implementation/ios (for platform)
- third_party/nearby/connections/clients/ios (for connections)
- third_party/nearby/connections/samples/ios (for sample codes)

PiperOrigin-RevId: 440895852
2022-04-11 08:19:27 -07:00
edwinwu fcb3b27314 BEGIN_PUBLIC
[iOS] Fixes the file_path is empty when "CreateIncomingInternalPayload" in internal_payload_factory. If empty then use the payload_id for the file_name.
END_PUBLIC

- This is for the way iOS -> Android file transfer.
- CC_MD5 is deprecated in iOS13, change to CC_SHA256
- UIImageWriteToSavedPhotosAlbum, the UIImage* is nil after completion callback to the selector "didFinishSavingWithError". Changes to show image by "showReceivedImage" after write to Photo album.
- "NSDownloadsDirectory" seems have
<<Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “Downloads” in the folder>>. Changes to use "NSTempDirectory".

PiperOrigin-RevId: 440808267
2022-04-11 00:18:05 -07:00
hai007 68ede1db20 WIFI Hotspot implementation (2)
Part 2: Connection common code for WIFI Hotspot

PiperOrigin-RevId: 440537272
2022-04-09 01:24:14 -07:00
edwinwu 0c8838ad9b Deprecates the InputFile with PayloadId and replace the one with file path.
PiperOrigin-RevId: 440516892
2022-04-08 21:44:01 -07:00
jfcarroll 4c13db0c2d This is a fix for incoming payloads not having a file_name set.
PiperOrigin-RevId: 440438936
2022-04-08 13:25:42 -07:00
hai007 43a165e418 WIFI Hotspot implementation (1)
Part 1: Internal common code

PiperOrigin-RevId: 440437253
2022-04-08 13:18:47 -07:00
edwinwu 59ea8e8005 [BLE Refactor] Add Psm value to BleAdvertisement and BleAdvertisementHeader.
PiperOrigin-RevId: 440410863
2022-04-08 11:20:59 -07:00
suetfei 338faab8c9 Merge pull request #574 from deling-google/fixproto
Check in compiled proto files and fix build
2022-04-07 13:34:06 -07:00
hai007 d21ff8270b BEGIN_PUBLIC
Fix Package.swift to eliminate a warning, exclude a new test, and use precompiled proto headers.
END_PUBLIC

PiperOrigin-RevId: 440152961
2022-04-07 11:11:38 -07:00
suetfei ba3c8810e1 BEGIN_PUBLIC
Internal Flow fix (again)
ENG_PUBLIC

Exclude compiled_proto dir.

PiperOrigin-RevId: 440143840
2022-04-07 10:38:51 -07:00