Commit Graph
193 Commits
Author SHA1 Message Date
Anay Wadhera 4b8575962a Explicitly create std::string from absl::string_view
Android does not support implicitly converting from absl::string_view to std::string.

PiperOrigin-RevId: 476415970
2022-09-23 11:13:47 -07:00
John Carroll 43da74bb7c Export InputStream class.
PiperOrigin-RevId: 476215485
2022-09-22 15:46:44 -07:00
Anthony Rueda fd59e9aede Consolidate credential_storage callback functions. Move all callback struct definitions in a central header file compiled as part of internal/platform/implementation:comm library.
PiperOrigin-RevId: 476186596
2022-09-22 13:46:47 -07:00
Janusz Sobczak f1f8680034 Fix debug build
PiperOrigin-RevId: 475955358
2022-09-21 16:44:15 -07:00
Guogang Li 2ca7d43f1a Fixed the BLE start/stop issues
PiperOrigin-RevId: 475915082
2022-09-21 13:53:37 -07:00
Guogang Li 9f9b3d26d1 Fixed the log issue for advertisement data
PiperOrigin-RevId: 474897767
2022-09-16 14:09:45 -07:00
Janusz Sobczak 69cb2310d0 Add DirectExecutor
PiperOrigin-RevId: 474671922
2022-09-15 15:32:11 -07:00
Anthony Rueda 69b86f1ad8 Removing unnecessary location::nearby::CredentialStorage class.
This class was only kept to satisfy MockClass requirements for cl/472776321.
The location::nearby::api::CredentialStorage class located under
platform/implementation/credential_storage.h contains virtual functions which
satisfy the same requirements. This CL will remove excess code.

PiperOrigin-RevId: 474643989
2022-09-15 13:33:43 -07:00
Hai Shang bbe77d8397 internal change
PiperOrigin-RevId: 474390888
2022-09-14 14:28:10 -07:00
John Carroll 0b57cd5c5f Fixed unit tests. Unit tests were failing locally, mostly just type mismatches, but there was an error in the GetDownloadPath for the test utilities.
PiperOrigin-RevId: 474358069
2022-09-14 12:17:35 -07:00
hai007 6b5251f8d2 Don't add WIFI_LAN device if it's device info is incomplete or has error
PiperOrigin-RevId: 474162548
2022-09-13 17:16:53 -07:00
Anthony Rueda 41de6e4450 Remove nested callback function logic from CredentialStorage g3 implementation. Change instances of passing callback by value to moving callback.
PiperOrigin-RevId: 474157705
2022-09-13 16:52:19 -07:00
John Carroll fa062b70c9 The order of includes was messed up in bluetooth_adapter.cc
PiperOrigin-RevId: 473854940
2022-09-12 15:07:54 -07:00
Anay Wadhera aaea08204d Introduce Device Provider interface
PiperOrigin-RevId: 472964206
2022-09-08 05:41:40 -07:00
Xin He 4f599a0d3e Save generated credentials and make the callback
PiperOrigin-RevId: 472776321
2022-09-07 11:50:30 -07:00
John Carroll 55c4714b99 Cleanup the code. Change inputs on ImplementationPlatform::GetDownloadPath from std::string& to absl::string_view.
PiperOrigin-RevId: 472770249
2022-09-07 11:22:24 -07:00
Anay Wadhera 92bf3356ee Reshuffle device.h to internal as both Connections and Presence will be utilizing it.
PiperOrigin-RevId: 472745171
2022-09-07 09:35:12 -07:00
Hai Shang da54ba3422 Add async operations to ble_v2
PiperOrigin-RevId: 472611661
2022-09-06 19:08:22 -07:00
Guogang Li 851f5ec0dd Fixed the crash when connecting a remote target from Win to Phone
PiperOrigin-RevId: 472502070
2022-09-06 10:50:21 -07:00
Janusz Sobczak d7889420c4 Add tests for Future::AddListener
PiperOrigin-RevId: 470814362
2022-08-29 14:25:33 -07:00
hai007 a7c967a034 Add null check before passing a char* to std::string::string()
PiperOrigin-RevId: 470812873
2022-08-29 14:19:12 -07:00
Hai Shang 40a9f13938 Internal change
PiperOrigin-RevId: 470043028
2022-08-25 11:43:00 -07:00
Anthony Rueda 1c15361a98 Adding g3 implementation of CredentialStorage virtual methods along with unit test coverage.
PiperOrigin-RevId: 470013245
2022-08-25 09:53:25 -07:00
hai007 01a4daffd2 Check the WiFiDirect support with Win32 API
Close the WiFi Handle after open it

PiperOrigin-RevId: 469602395
2022-08-23 18:02:15 -07:00
John Carroll 3e78cef57f Flattening of Input/OutputFile.
PiperOrigin-RevId: 469595318
2022-08-23 17:19:08 -07:00
Anay Wadhera 9dc4b83ca0 Nearby internal: fix for Android compile
PiperOrigin-RevId: 469337263
2022-08-22 18:35:56 -07:00
Anay Wadhera 5b7bb37d41 Nearby Presence/Implementation: Fix for Android compile
PiperOrigin-RevId: 468735587
2022-08-19 10:43:41 -07:00
Anthony Rueda 4d2ff863f9 Add platform agnostic implementation of Credential_Storage class.
PiperOrigin-RevId: 468251604
2022-08-17 11:36:58 -07:00
Xin He b57d03425f Upgrade protobuf from version 2 to 3
PiperOrigin-RevId: 468078014
2022-08-16 18:39:12 -07:00
Xin He f166f1e22c Remove presence_identity struct.
PiperOrigin-RevId: 468032143
2022-08-16 14:56:38 -07:00
Xin He e5c24b8b8a Add manager app ID into the APIs
PiperOrigin-RevId: 467757514
2022-08-15 14:11:15 -07:00
Xin He 123a2cfd18 Move credentials related proto from Prensence to internal
Replace PresenceIdentityType with proto

PiperOrigin-RevId: 467294239
2022-08-12 14:18:34 -07:00
hai007 fa92234b7c Restore the previous WIFI connection for client after disconnect from Hotspot.
PiperOrigin-RevId: 467009808
2022-08-11 11:42:28 -07:00
Nick Bourdakos c48e27d754 Add GitHub Action for testing Linux build.
PiperOrigin-RevId: 466797648
2022-08-10 15:18:44 -07:00
Janusz Sobczak 07119e80de Merge CertificateManager and CredentialManager
Refactoring change.
Merge CertificateManager and CredentialManager into a single interface.
Hide AdvertisementFactory in implementation/. The client app will not be using
that class directly.
Clean up build targets.

PiperOrigin-RevId: 466748133
2022-08-10 11:46:16 -07:00
Nick Bourdakos 63b4f0760c Start initial Swift SDK by creating a lightweight Objective-C wrapper
PiperOrigin-RevId: 466681084
2022-08-10 07:44:26 -07:00
Suet-Fei Li 55f20775d2 Fix internal flow
PiperOrigin-RevId: 466426960
2022-08-09 12:02:16 -07:00
hai007 2d979fd86c Create a Device Object for Hotspot Client to avoid being disconnected by Hotspot.
Without creating a Device Object for the connection from a Hotspot Client, [Microsoft-Windows-WLAN-AutoConfig] may think it is a malign device and will disconnect it after 2 minutes, which will also causes Hotspot being deleted eventually.

PiperOrigin-RevId: 466395817
2022-08-09 10:18:50 -07:00
bourdakos 4c70daf66f Fix github build
PiperOrigin-RevId: 465689821
2022-08-05 18:44:37 -07:00
guogang 5df9ef5eca Removed API mutex from platform implementation.
PiperOrigin-RevId: 465635705
2022-08-05 13:31:05 -07:00
suetfei 4bf31d18da Internal Flow change
PiperOrigin-RevId: 465623255
2022-08-05 12:30:23 -07:00
jfcarroll d09223d435 Prevent escaping the users Downloads folder by removing all occurances of /.. from the path passed in.
PiperOrigin-RevId: 465450615
2022-08-04 18:13:29 -07:00
suetfei 21c2c7c1ea Port crypto from location/nearby/cpp/sharing/implementation/internal/crypto to third_party/nearby/internal/crypto.
BEGIN_PUBLIC
Add crypto library to Nearby.
END_PUBLIC

Remove the reference to absl::SourceLocation as it is not in OSS.

PiperOrigin-RevId: 465427879
2022-08-04 16:11:00 -07:00
hai007 a732616a97 Change private/public credentials from struct to proto.
PiperOrigin-RevId: 464678736
2022-08-01 19:16:05 -07:00
jfcarroll 778c77eacd Persist the original radio name, and restore it on app start if the radio name is our radio name.
PiperOrigin-RevId: 464148898
2022-07-29 13:43:35 -07:00
hai007 0d4964da7b Splitting SaveCredentials into two separate virtual functions:
SavePrivateCredentials() and SavePublicCredentials().

Replacing Get_**_CredentialsCallback implementation with two function wrappers
instead of one function wrapper for the ExceptionOr class.

PiperOrigin-RevId: 464108110
2022-07-29 10:34:22 -07:00
hais d5f86a04d6 Replace to use IdentityType where TrustType were used.
PiperOrigin-RevId: 463713311
2022-07-27 17:07:19 -07:00
jsobczak be140a71d5 Make CredentialManager abstract
An abstract CredentialManager will help with unit testing.
Also added an empty CredentialManagerImpl class.

PiperOrigin-RevId: 463651261
2022-07-27 12:34:31 -07:00
hai007 c40a669755 Internal Change
PiperOrigin-RevId: 463599374
2022-07-27 08:57:29 -07:00
hai007 eaac8d045d Expose nearby/internal/platform/logging to nearby/presence
PiperOrigin-RevId: 461864722
2022-07-19 06:14:12 -07:00