Janusz Sobczak
ca9bbd3a9c
Fix several race conditions
...
The fixes are specific to unit test environment.
PiperOrigin-RevId: 546342096
2023-07-07 11:53:50 -07:00
Qin Wang
22c3a07677
Migrate DataManager to third_party/nearby/internal
...
PiperOrigin-RevId: 544395891
2023-06-29 10:31:07 -07:00
hai007
ac0af7b048
Fix g3 platform timer implementation.
...
PiperOrigin-RevId: 542931629
2023-06-23 12:41:41 -07:00
Janusz Sobczak
e46b19c798
Use the MAC address as peripheral name
...
We use BlePeirpheral::GetName()` as a mac address.
PiperOrigin-RevId: 541010558
2023-06-16 14:54:42 -07:00
Janusz Sobczak
ca60afa007
Add robust gatt client
...
PiperOrigin-RevId: 539817203
2023-06-12 18:29:59 -07:00
Qin Wang
ba740c9a5c
Implement RetroactivePairingDetector
...
PiperOrigin-RevId: 538319791
2023-06-06 16:18:38 -07:00
Janusz Sobczak
7c9b517d76
Implement G3 GattServer::Stop
...
PiperOrigin-RevId: 537149080
2023-06-01 15:45:21 -07:00
Janusz Sobczak
a5060a3c18
Call gatt disconnect callback in tests
...
PiperOrigin-RevId: 536737632
2023-05-31 09:33:52 -07:00
Chun Zhang
c9884f6218
Migrate AccountManager from location/nearby to third_party/nearby
...
PiperOrigin-RevId: 533915507
2023-05-21 17:37:15 -07:00
Janusz Sobczak
1c9dd093f1
Fix retroactive pairing test
...
PiperOrigin-RevId: 532853830
2023-05-17 11:35:48 -07:00
Chun Zhang
a925ed1072
Move FakeAuthenticationManager from location to third_party.
...
PiperOrigin-RevId: 532237745
2023-05-15 15:04:03 -07:00
Crisrael Lucero
01c8e1ed05
Convert absl::string_view to const std::string&
...
PiperOrigin-RevId: 531634295
2023-05-12 16:40:50 -07:00
Chun Zhang
b07700629d
Replace std::string with absl::string_view
...
PiperOrigin-RevId: 531607615
2023-05-12 14:39:48 -07:00
Janusz Sobczak
f1f15bd967
Use canonical MAC address in tests.
...
PiperOrigin-RevId: 531601021
2023-05-12 14:12:25 -07:00
Janusz Sobczak
b5938c0d17
Add G3 gatt server
...
PiperOrigin-RevId: 531287485
2023-05-11 13:15:40 -07:00
Nick Bourdakos
8886b99dde
Refactor the preferences repository to be a Windows implementation detail of the preferences manager
...
PiperOrigin-RevId: 531086202
2023-05-10 21:26:32 -07:00
Janusz Sobczak
0901aec6e2
Add BleMedium::GetRemotePeripheral
...
Added:
nearby::api::ble_v2::BlePeripheral::GetUniqueId()
nearby::api::ble_v2::BleMedium::GetRemotePeripheral(...)
Moved BlePeripheral implementation from bluetooth_adapter_* to ble_v2.*
Added G3 (test) implementation for the new methods.
PiperOrigin-RevId: 531023568
2023-05-10 15:40:38 -07:00
Qin Wang
69f4feaf55
Add g3 implementation for BluetoothPairing
...
PiperOrigin-RevId: 530965844
2023-05-10 11:47:00 -07:00
Nick Bourdakos
58772e95f9
Internal change
...
PiperOrigin-RevId: 529464527
2023-05-04 11:24:39 -07:00
Qin Wang
e46bfb52d0
Define BluetoothPairing API for Nearby Platform Library and add implementation on Windows platform
...
PiperOrigin-RevId: 528510444
2023-05-01 10:36:59 -07:00
Chun Zhang
2e7f7a7d90
Migrate PreferencesManager from location/nearby to third_party/nearby
...
PiperOrigin-RevId: 524900136
2023-04-17 11:23:01 -07:00
Chun Zhang
00bba36219
Migrate PreferencesRepository from location/nearby to third_party/nearby
...
PiperOrigin-RevId: 524185819
2023-04-13 21:19:12 -07:00
hai007
c78bf2b209
Automated visibility attribute cleanup.
...
PiperOrigin-RevId: 522116588
2023-04-05 12:00:55 -07:00
Janusz Sobczak
665b0b0e86
Add observer for pairing events.
...
Defines an observer for BT classic medium.
The observer is notified when a device is paired or unpaired.
PiperOrigin-RevId: 521917539
2023-04-04 18:13:07 -07:00
Janusz Sobczak
c249c3079f
Support fake clock in test environment
...
A synthetic clock helps testing (long) timeouts by allowing us to move the time
forward by an arbitrary amount.
PiperOrigin-RevId: 520407442
2023-03-29 12:19:28 -07:00
Qin Wang
a62000d3a8
Add g3 platform/medium_Environment for GattConnection
...
PiperOrigin-RevId: 520387265
2023-03-29 11:10:07 -07:00
Nick Bourdakos
a933a91413
Internal Change
...
PiperOrigin-RevId: 520165614
2023-03-28 16:26:40 -07:00
Janusz Sobczak
adcb341190
Verify that IO on closed socket returns an error
...
The test implementation of BluetoothSocket::GetInputStream() would crash if
the socket was closed. That's not ideal because the caller can't verify if the
socket is open or closed.
New test verifies that GetOutputStream() and GetInputStream() always return a
valid reference.
PiperOrigin-RevId: 518722540
2023-03-22 18:04:12 -07:00
Nick Bourdakos
cbf50a3d49
Add more visibilities
...
PiperOrigin-RevId: 518647351
2023-03-22 12:51:23 -07:00
Nick Bourdakos
0b3c759aa3
Remove unneeded WebRTC flags
...
PiperOrigin-RevId: 518629654
2023-03-22 11:44:12 -07:00
Nick Bourdakos
ec025502dc
Refactor WebRTC code to avoid use of select for stubs
...
PiperOrigin-RevId: 518491132
2023-03-22 00:25:54 -07:00
Anay Wadhera
69d2098ecb
Weave port [1/n]: Introduce Weave packet implementation
...
PiperOrigin-RevId: 517526002
2023-03-17 15:44:09 -07:00
Qin Wang
86ca85b85a
Migrate fake functions to third_party/nearby to help unit test
...
PiperOrigin-RevId: 517433481
2023-03-17 09:34:58 -07:00
Janusz Sobczak
a70826dbf8
Add a timeout to Future
...
Future has a `Get(Duration)` method which allows us to wait synchronously until
a timeout.
Adding a timeout to the constructor allows the Future to time out
asynchronously.
PiperOrigin-RevId: 516982717
2023-03-15 18:18:54 -07:00
Guogang Li
fd5430764f
Created NearbyFlags to avoid create multiple classes
...
PiperOrigin-RevId: 516885843
2023-03-15 11:44:25 -07:00
Qin Wang
1e4497d59c
Add Write Type enum to specify what type of GATT write should be performed
...
PiperOrigin-RevId: 515487102
2023-03-09 17:28:09 -08:00
Guogang Li
988847e2d6
internal change
...
PiperOrigin-RevId: 515350366
2023-03-09 09:01:58 -08:00
Qin Wang
0c078b3528
Convet ByteArray to std::string in ble_gatt_client
...
PiperOrigin-RevId: 514786088
2023-03-07 11:10:34 -08:00
Qin Wang
ba8d60b8a9
Implement subscription for a GATT characteristic value changed
...
PiperOrigin-RevId: 513960871
2023-03-06 07:08:08 -08:00
Qin Wang
4727861f5d
Refactor GattCharactristic to support bitwise combination of Permission and Property
...
PiperOrigin-RevId: 513339751
2023-03-01 14:21:04 -08:00
Anay Wadhera
abe68db97d
Add GattServer#NotifyCharacteristicChanged to ble_v2
...
PiperOrigin-RevId: 512124578
2023-02-24 11:46:33 -08:00
Anay Wadhera
f3ebf77ed2
Add GattClient#SetCharacteristicNotification for subscribing to a GATT characteristic
...
PiperOrigin-RevId: 511862183
2023-02-23 12:54:41 -08:00
Aaron Yu
fc1811f966
Set g3 bluetooth adapter to be enabled by default and remove Toggle()
...
PiperOrigin-RevId: 509962396
2023-02-15 16:25:43 -08:00
Janusz Sobczak
5f4144cd0b
Update SharedCredential definition
...
PiperOrigin-RevId: 507568902
2023-02-06 13:33:23 -08:00
Eiden Kim
3d9ce368ff
Fixed crashpad db creation failure and changed root to CommonAppData. Changed captured Nearby Share Info to save to CommonAppData. Changed Clearcut root to CommonAppData.
...
PiperOrigin-RevId: 506528040
2023-02-01 23:15:22 -08:00
hai007
3cbbecd53a
Change log and crash dump locations from a per user data location to a per machine common data location.
...
PiperOrigin-RevId: 505711827
2023-01-30 09:14:00 -08:00
Janusz Sobczak
94e70d0ddd
Store consumed salts in private credentials
...
PiperOrigin-RevId: 505167378
2023-01-27 11:30:54 -08:00
Qin Wang
a0692e6306
Migrate device_info from location/nearby to third_party/nearby
...
PiperOrigin-RevId: 504935151
2023-01-26 14:01:11 -08:00
Anay Wadhera
c58b45eb50
Rename PublicCredential to SharedCredential and PrivateCredential to LocalCredential
...
PiperOrigin-RevId: 503221477
2023-01-24 12:09:21 -08:00
Janusz Sobczak
f4d85f9b90
Migrate to AnyInvocable in platform code
...
PiperOrigin-RevId: 504104740
2023-01-23 16:04:21 -08:00