Commit Graph
2054 Commits
Author SHA1 Message Date
Joy Babafemi 85bf78ef70 Add sensor fusion implementation to presence C++
PiperOrigin-RevId: 555676715
2023-08-10 15:24:29 -07:00
Janusz Sobczak cce7cf59b9 Replace std::function with AnyInvocable
PiperOrigin-RevId: 555650115
2023-08-10 14:17:31 -07:00
Suet-Fei Li 5589166b3b Update copyright year.
PiperOrigin-RevId: 555341312
2023-08-09 19:14:36 -07:00
Janusz Sobczak e703b21cde Fix connections_test
PiperOrigin-RevId: 555282324
2023-08-09 19:13:52 -07:00
Janusz Sobczak 5393daf9f1 Merge logging and types build targets
Both "types" and "logging" build targets included "logging.h"
Merging them together avoids circular dependencies.

PiperOrigin-RevId: 555262816
2023-08-09 19:13:12 -07:00
hai007 d19f21ed71 [Sharing] Log Decrypt Certificate Failure Status.
PiperOrigin-RevId: 555186404
2023-08-09 19:12:30 -07:00
Guogang Li 5b155f9a4a Added data section filter in BLE scanning
PiperOrigin-RevId: 553660098
2023-08-09 19:11:48 -07:00
Janusz Sobczak f18ab07873 Fix FastPairScannerImplTest
The scanner must not be destroyed while there are still scanner's tasks running on the background executor.

PiperOrigin-RevId: 553621813
2023-08-09 19:11:06 -07:00
Qin Wang e8c0ce3d89 Deprecate Fast Pair Mediator
PiperOrigin-RevId: 553538010
2023-08-09 19:10:24 -07:00
Guogang Li b798798f5f Log medium type for discovered endpoint
PiperOrigin-RevId: 553510472
2023-08-09 19:09:42 -07:00
hai007 005f734d53 [Sharing] add metadata for FAST_SHARE_SERVER_RESPONSE event.
PiperOrigin-RevId: 553419234
2023-08-09 19:08:58 -07:00
hai007 903c8e07be [Sharing Analytics]Correct AttachmentTransmissionStatus from FAILED_NULL_CONNECTION to FAILED_NULL_CONNECTION_DISCONNECTED if the transfer failure is caused by Wifi/Bluetooth setting off.
PiperOrigin-RevId: 553396704
2023-08-09 19:08:15 -07:00
hai007 859dd1d1bd Add definition to Parsing Failed Type
PiperOrigin-RevId: 553382949
2023-08-09 19:07:35 -07:00
Guogang Li 0282ba7700 Changed the hotspot connection interval
PiperOrigin-RevId: 553319367
2023-08-09 19:06:53 -07:00
hai007 3a88f4e217 record connection layer status code
PiperOrigin-RevId: 553302833
2023-08-09 19:06:13 -07:00
hai007 9c6a11eff1 [NP] Remove metadata creation from FakePresenceClient
To make the nearby_presence_unittests.cc more percise, the test should create the metadata and pass it to the fake client instead of the client creating it.  This change also allows for the unittests to use RunLoop instead of RunUntilIdeal in multiple places.

Bug: b/285015071
PiperOrigin-RevId: 553297388
2023-08-09 19:05:34 -07:00
Qin Wang 886ac8a2b9 Remove device from local repository when user forget a device
PiperOrigin-RevId: 553269983
2023-08-09 19:04:52 -07:00
hai007 b6459434a2 Update ranging interval from update rates.
PiperOrigin-RevId: 553250662
2023-08-10 00:37:35 +00:00
hai007 347d10b74f Automated visibility attribute cleanup.
PiperOrigin-RevId: 553138950
2023-08-02 07:30:35 -07:00
hai007 8904cb04a6 [Sharing] Add SetAccount and activity name logging when user switches account.
PiperOrigin-RevId: 553027327
2023-08-01 22:20:44 -07:00
Guogang Li 20f2291476 Added APIs to allow/prevent sleep in session manager
PiperOrigin-RevId: 552958620
2023-08-01 16:26:47 -07:00
Qin Wang 33b2748a8c Add UX for Retroactive Pairing
PiperOrigin-RevId: 552944003
2023-08-01 15:38:15 -07:00
Copybara-Service 498fc35aa5 Merge pull request #1957 from TheShepord:fpwinrs_pair
PiperOrigin-RevId: 552656377
2023-07-31 19:20:22 -07:00
Guogang Li 868d3ce046 Resolved the issue to monitor lock/unlock in platform SDK
PiperOrigin-RevId: 552655345
2023-07-31 19:13:27 -07:00
Nick Bourdakos 9d2cfc19c9 Add Objective-C++ GATT server wrapper
PiperOrigin-RevId: 552636264
2023-07-31 17:20:14 -07:00
Richard Levasseur 0d58ead61c Internal change
PiperOrigin-RevId: 552574409
2023-07-31 13:22:20 -07:00
hai007 4a100435f7 Apply result code to BLE L2CAP mediums
PiperOrigin-RevId: 552347968
2023-07-30 20:31:54 -07:00
Lucas Silva Shepard e73a9bb9a8 [fp-rs] Updated API for accessing platform-specific structs.
Previously, `Device` trait was implemented by both Classic and BLE
Devices. This forced usage of associated types for choosing the type of
address employed, bringing about limitations of Rust's type system. By
ensuring cross-platform traits are only used for shared cross-platform
behavior, there are no longer type annotation issues in the application
layer.

Changes:
* Split the `Device` trait into `ClassicDevice` and `BleDevice`.
* Migrated these to an `api/` module to avoid name clashes and clearly
  differentiate common structs (under `common/) from common traits (under
  `api/)`.
* Removed shared `Address` enum in order to get rid of device's address
  associated type.
* Application layer can now only talk to impl traits rather than the concrete
  platform-specific type. This ensures compile-time behavior guarantees.
  Constructors for cross-platform impls provided under the `Platform`
  unit struct.
* Updated `unsupported` module for unsupported platforms. Previously,
  dummy inherent impls would've been necessary for calling the `new()`
  method. This is now part of the `ClassicDevice` and `BleDevice` API,
  so cross-platform behavior is guaranteed to work.
2023-07-29 17:23:45 -07:00
Lucas Silva Shepard 25a3257880 [fp-rs] Moving service data and advertisement information into separate BleAdvertisement struct. 2023-07-29 17:23:13 -07:00
Lucas Silva Shepard f42fdb4186 [fp-rs] Temporarily removing bluetooth lib abstraction layer, applications now talk directly to platform code.
Rust's type system is causing issues with notating associated types. For
now, concrete types will be used, but this will be fixed when the API is
updated with splitting Device into ClassicDevice and BleDevice.
2023-07-29 17:22:16 -07:00
Lucas Silva Shepard ba945aa360 [fp-rs] Implemented device selection CLI. 2023-07-29 17:22:14 -07:00
Lucas Silva Shepard 7730a0f1db [fp-rs] Updating Fast Pair Seeker to filter out non-FP advertisements. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 81592cc4c5 [fp-rs] Device now holds 16bit UUID service data, collected by Adapter. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 4be9872f6d [fp-rs] Updated device scanning interface to facilitate adding more functionality to device constructor. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard fc07423925 [fp-rs] Implemented classic device pairing 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 9da0bf2987 [fp-rs] Implemented address API 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 494eb66027 [fp-rs] Implemented custom error types for Bluetooth library. 2023-07-29 17:18:39 -07:00
Qin Wang e36b26184a Retroactive pairing detector: check login status and if device has already been saved to the user's account
PiperOrigin-RevId: 551985769
2023-07-28 17:04:46 -07:00
Janusz Sobczak 749d528206 Add FinishRetroactivePairing
Add the second step of retroactive pairing.
The client should:
* start retroactive pairing
* get user consent
* finish retroactive pairing

PiperOrigin-RevId: 551934024
2023-07-28 13:20:56 -07:00
Nick Bourdakos c1d74120a0 Add initial BLEv2 Bluetooth Adapter
PiperOrigin-RevId: 551922301
2023-07-28 12:32:27 -07:00
Janusz Sobczak 5acf702660 Use endpoint lost alarms on PCP handler thread only
endpoint_lost_by_medium_alarms_ should be accessed only
on PCP handler thread to avoid race conditions.
Added thread annotations to protect against accidental use on a different thread.
Test only change.

PiperOrigin-RevId: 551919704
2023-07-28 12:21:32 -07:00
Guogang Li 6d886e3fc8 Fixed some issues in analytics data
PiperOrigin-RevId: 551900985
2023-07-28 11:13:07 -07:00
Guogang Li eb5f8aed10 Fixed WI-FI hotspot stuck issue during close
PiperOrigin-RevId: 551703821
2023-07-27 18:57:27 -07:00
Nick Bourdakos 0a13ce51f4 Make GNCBLEGATTServer thread safe
Fixes an issue where if a characteristic is created and then updated with a non-nil value, and a new characteristic under the same service is added, then when the service is re-added the old characteristic will be permanently cached and the dynamic reads will stop working.

This also eliminates the issue when characteristics are created concurrently, since service additions are batched, if the service addition fails then only one of the characteristics will know that it failed to get added.

This change also introduces the nuance of "success" does not mean the CoreBluetooth method has completed successfully, but instead means that the intended state has been recorded and the class will do its best to maintain that state. For example, a successful "start advertising" call means that we have the advertisement cached and we will start advertising as soon as we can (like BT transitions from off to on) and will do our best to keep advertising (like BT transitions from on to off to on again).

PiperOrigin-RevId: 551660634
2023-07-27 15:40:30 -07:00
Janusz Sobczak 974d4b357c Skip SDP check for FP rfcomm connection on Windows
The SDP checks fails but rfcomm connection works.
Skipping the SDP check does not seem to have any ill side effects.

PiperOrigin-RevId: 551370531
2023-07-26 18:15:44 -07:00
Janusz Sobczak f3bbb8caeb Fix race condition in ThroughputRecorder
PiperOrigin-RevId: 551361687
2023-07-26 17:28:45 -07:00
Janusz Sobczak 2c1ed158bc Add StopDiscovery call
Test only change.

PiperOrigin-RevId: 551358525
2023-07-26 17:14:08 -07:00
Janusz Sobczak 35acd3d849 Destroy ThroughputRecorder when PendingPayload is destroyed
This fixes a race condition where a Tp Recorder was used after being destroyed.

PiperOrigin-RevId: 551350023
2023-07-26 16:36:25 -07:00
Janusz Sobczak cae06bd15d Close executors in BasePcpHandler::Shutdown
The client can call DisconnectFromEndpointManager() explicitly before
BasePcpHandler is shut down. In this case, th executors were not terminated
inside BasePcpHandler::Shutdown()
This caused use-after-free errors in BasePcpHandlerTest.IoError_RequestConnectionFails

PiperOrigin-RevId: 551340708
2023-07-26 16:00:08 -07:00
Nick Bourdakos a42cdc7346 Move Server Socket and its dependencies to their own files
PiperOrigin-RevId: 551330682
2023-07-26 15:21:46 -07:00