Commit Graph
968 Commits
Author SHA1 Message Date
Pu Shi 643c0efdde [Nearby Connections] Add methods to shutdown executors in bwu_manager
Adding methods that allow us to shutdown executors in bwu_manager
during Nearby Connections shutdown process to prevent potential crashes.

PiperOrigin-RevId: 466425604
2022-08-09 11:57:38 -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
hai007 0a8f1f1c39 Implement Credentials Generation APIs
PiperOrigin-RevId: 466389238
2022-08-09 09:56:54 -07:00
Nick Bourdakos c495cf830f Internal change
PiperOrigin-RevId: 466220975
2022-08-08 19:40:14 -07:00
Janusz Sobczak 6e6ae3ebd7 Decode the action in Base NP advertisements back into a list of Data Elements
PiperOrigin-RevId: 466204445
2022-08-08 19:39:05 -07:00
Nick Bourdakos 076b00ed61 Internal change
PiperOrigin-RevId: 466164069
2022-08-08 19:37:52 -07:00
bourdakos 4c70daf66f Fix github build
PiperOrigin-RevId: 465689821
2022-08-05 18:44:37 -07:00
guogang 9b12bdde8d Fixed the crash in connection close event
PiperOrigin-RevId: 465657456
2022-08-05 15:14:13 -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
bourdakos 377dc47c9f Temporarily ignore crypto to fix GitHub build
PiperOrigin-RevId: 465474066
2022-08-04 21:13:32 -07:00
jfcarroll 5b3d443815 Remove the call to Toggle from the BluetoothRadio destructor. https://buganizer.corp.google.com/issues/237492358
PiperOrigin-RevId: 465451962
2022-08-04 18:22:51 -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
jsobczak ce6c5893d7 Fix Action Data Elements construction.
Data Elements representing an action should have the type set to
kActionFieldType, and the actual action stored in the value.

PiperOrigin-RevId: 465365230
2022-08-04 11:40:04 -07:00
hai007 4d6bc3d62f Fix redundant statement in scan_request comparator
PiperOrigin-RevId: 465340601
2022-08-04 10:05:58 -07:00
jsobczak 319e5abea4 Add advertisement decoder
The decoder allows us to parse incoming Nearby Presence advertisements.

PiperOrigin-RevId: 465146528
2022-08-03 14:18:12 -07:00
hai007 ecf51ff13d [Nearby][Presence] Add a builder for ScanRequest
PiperOrigin-RevId: 465139728
2022-08-03 13:52:24 -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
hai007 a37a7b7a83 [Nearby][Presence] Create unit tests for credential
PiperOrigin-RevId: 463900304
2022-07-28 12:37:32 -07:00
hai007 ef014d47b8 Disable encryption for HOTSPOT
PiperOrigin-RevId: 463773343
2022-07-28 00:51:47 -07:00
hai007 974ff693b1 Check device type in java code instead of ADP profile because ADP only apply on launched device, it will make our testing failed on not launched Pixel, see b/238835231#comment26
PiperOrigin-RevId: 463766386
2022-07-28 00:00:27 -07:00
hais d5f86a04d6 Replace to use IdentityType where TrustType were used.
PiperOrigin-RevId: 463713311
2022-07-27 17:07:19 -07:00
hais c7c698412c Presence ScanRequest type def
PiperOrigin-RevId: 463703748
2022-07-27 16:17:46 -07:00
jsobczak a56d36f3a5 Move constants to DataElement.
The move will allow us to reuse these constants.

PiperOrigin-RevId: 463670924
2022-07-27 13:54:46 -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 d4b40ed9a7 Change device metadata from struct to proto.
PiperOrigin-RevId: 463583244
2022-07-27 07:44:54 -07:00
jsobczak 3ed4bfcfe1 Set non_prod compatibility
PiperOrigin-RevId: 462733200
2022-07-22 17:03:23 -07:00
hai007 d2c401112c Modify Credential data structure.
PiperOrigin-RevId: 462252551
2022-07-20 16:12:34 -07:00
hai007 eaac8d045d Expose nearby/internal/platform/logging to nearby/presence
PiperOrigin-RevId: 461864722
2022-07-19 06:14:12 -07:00
hais 6223caee42 Delete unused logging2.h.
PiperOrigin-RevId: 461779795
2022-07-18 20:05:39 -07:00
hais 9dec6143d1 Move credential.h to presence dir
PiperOrigin-RevId: 461779197
2022-07-18 20:03:20 -07:00
hai007 d41cd674c8 Add onSessionComplete method in ClientProxy to log session
PiperOrigin-RevId: 461772377
2022-07-18 19:17:19 -07:00
jsobczak 7153f5e482 Add advertisement factory
PiperOrigin-RevId: 461754387
2022-07-18 17:31:13 -07:00
hai007 6af55cf1bb Expose internal/platform/implementation:types to nearby/presence
PiperOrigin-RevId: 461253782
2022-07-15 15:35:46 -07:00
hai007 bbf6de9d12 Remove a check from a Windows test.
PiperOrigin-RevId: 461245680
2022-07-15 14:55:08 -07:00
hai007 ddcef2c67a Expose Encryption to nearby/presence
PiperOrigin-RevId: 461239780
2022-07-15 14:37:17 -07:00
xlythe 859a0ecb27 Add USB enum
PiperOrigin-RevId: 461149613
2022-07-15 01:49:46 -07:00
guogang 591ef0922e Caught all exceptions in BLE scanning and advertising
PiperOrigin-RevId: 460760683
2022-07-13 11:16:03 -07:00
guogang bff4051015 Fixed the deadlock in BluetoothServerSocket
PiperOrigin-RevId: 460724338
2022-07-13 08:41:13 -07:00
hai007 e4a0f280e2 BWU Hotspot Responder(client) need to disconnect Hotspot when the session is done
PiperOrigin-RevId: 460577462
2022-07-12 16:23:48 -07:00
jsobczak 61c9876ce9 Add Presence Identity types
PiperOrigin-RevId: 460569984
2022-07-12 15:46:58 -07:00
jsobczak b92881a460 Define Data Elements and ActionFactory.
Data Elements describe the custom data entities that can be added
to an advertisement.
ActionFactory takes a list of Data Elements and creates an Action
for the base NP advertisement.

PiperOrigin-RevId: 460557059
2022-07-12 14:48:42 -07:00
hai007 73264d8feb Change package default visibility.
PiperOrigin-RevId: 460384422
2022-07-11 23:26:57 -07:00
hais b6f817274e Initial header files showing class dependency and ownership.
No detailed function signatures nor impl included yet.

PiperOrigin-RevId: 460300058
2022-07-11 14:26:26 -07:00
jfcarroll 1a9e4a2aff Added test for BluetoothClassicServerSocket.
PiperOrigin-RevId: 459776171
2022-07-08 09:46:29 -07:00
hai007 0a7f68f382 Cap the output stream package size to kMaxAllowedReadBytes, which is 1048576
PiperOrigin-RevId: 459622727
2022-07-07 16:00:19 -07:00