Commit Graph
56 Commits
Author SHA1 Message Date
Nick Bourdakos a08a42077c PR #2404: Add license header to all source files
Imported from GitHub PR https://github.com/google/nearby/pull/2404

Copybara import of the project:

--
a6fbb3c396321c0b9012b787323f5f2ff652fd8f by Nick Bourdakos <bourdakos1@gmail.com>:

Add license header to all source files

Merging this change closes #2404

PiperOrigin-RevId: 623540004
2024-04-10 10:40:38 -07:00
hai007 2a56254756 Automated Code Change
PiperOrigin-RevId: 621908243
2024-04-04 10:52:30 -07:00
hai007 d6a6b7e1c3 Automated Code Change
PiperOrigin-RevId: 621745483
2024-04-03 23:18:34 -07:00
Francis Tsui 32740f8591 Move FakeAccountManager to nearby/internal/test
PiperOrigin-RevId: 592055356
2023-12-18 17:30:16 -08:00
Francis Tsui cf69c87d95 Cleanup FakeAccountManager.
- Remove unnecessary deps.

PiperOrigin-RevId: 591964328
2023-12-18 11:41:24 -08:00
Qin Wang 0e7fc8d429 Disable flaky test //third_party/nearby/fastpair/internal:fast_pair_seeker_impl_test
PiperOrigin-RevId: 590018163
2023-12-11 18:31:53 -08:00
Janusz Sobczak b33c0e0332 Migrate to AnyInvocable in auth module
Merged success/failure callbacks into a single callback
in SignInCallback and AccessTokenCallback to simplify resource management and to avoid making copies.

PiperOrigin-RevId: 565744310
2023-09-15 12:11:50 -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
Qin Wang 886ac8a2b9 Remove device from local repository when user forget a device
PiperOrigin-RevId: 553269983
2023-08-09 19:04:52 -07:00
Qin Wang 33b2748a8c Add UX for Retroactive Pairing
PiperOrigin-RevId: 552944003
2023-08-01 15:38:15 -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
Qin Wang 3456c419c8 Check account log in status before attempt to write account key
PiperOrigin-RevId: 551032914
2023-07-25 16:39:02 -07:00
Janusz Sobczak 0d2e75f2a2 Call pairing result in background
This prevents calling the callback twice and out of order.

PiperOrigin-RevId: 547562324
2023-07-12 12:02:28 -07:00
Janusz Sobczak d559a4a435 Fix tsan errors
Improve clean up order to prevent use-after-free errors.

PiperOrigin-RevId: 547313964
2023-07-11 15:26:43 -07:00
Janusz Sobczak 522ac8c13e Fix threading issues in tests
The changes make thread sanitizer happy.

PiperOrigin-RevId: 546960147
2023-07-10 13:17:12 -07:00
Qin Wang 5bce94d8ee Move fast_pair_repository to third_party/nearby/fastpair/repository and remove all deprecated files
PiperOrigin-RevId: 546057062
2023-07-06 12:10:57 -07:00
Janusz Sobczak d516e52204 Add FastPairService adapter.
Add an adapter and windows plugin for scalable seeker,

PiperOrigin-RevId: 545920541
2023-07-06 02:18:02 -07:00
Janusz Sobczak e00bdfb3e3 Add retro pairing in scalable seeker
Listen for manual pairing events and notify plugins.
Add retroactive pairing flow in the scalable seeker.
Actually upload the account key to the provider.
Missing bits:
- Notify the user and get their permission,
- Upload the new Account Key to user's account.

PiperOrigin-RevId: 544616348
2023-06-30 04:06:43 -07:00
Janusz Sobczak b89eeb1ac1 Pass screen locked event to plugins
PiperOrigin-RevId: 543512467
2023-06-26 12:37:45 -07:00
Janusz Sobczak cabad16421 Register BluetoothClassicMedium::Observer
PiperOrigin-RevId: 543506617
2023-06-26 12:12:28 -07:00
Janusz Sobczak 33abd7d879 Increase plugin life time
A plugin is created when it is first needed and destroyed when the FP device
is destroyed. This allows the plugins to keep state during long running
operations such as presenting a UI query.

PiperOrigin-RevId: 543502491
2023-06-26 11:58:56 -07:00
Janusz Sobczak 20acd4eeb9 Add initial pairing in scalable seeker
PiperOrigin-RevId: 541034178
2023-06-16 16:14:14 -07:00
Janusz Sobczak c4139c83b0 Use RobustGattClient
PiperOrigin-RevId: 540060033
2023-06-13 13:42:19 -07:00
Qin Wang e20fb4f75d Add screen locked listener for fast pair windows
PiperOrigin-RevId: 540038338
2023-06-13 12:26:20 -07:00
Janusz Sobczak ca60afa007 Add robust gatt client
PiperOrigin-RevId: 539817203
2023-06-12 18:29:59 -07:00
Qin Wang c786b07fcf Add pair_broker to FastPairMediator/FastPairSeeker
PiperOrigin-RevId: 538592398
2023-06-07 14:27:29 -07:00
Qin Wang ba740c9a5c Implement RetroactivePairingDetector
PiperOrigin-RevId: 538319791
2023-06-06 16:18:38 -07:00
Janusz Sobczak ddbb711b7b Add InitialPair plugin
Creates plugins/ directory which will store internal plugins used for admin
tasks and testing. In this CL
* FakeFastPairPlugin for tests
* InitalPairPlugin - simple plugin that triggers Initial Pair flow

PiperOrigin-RevId: 536775192
2023-05-31 11:36:00 -07:00
Janusz Sobczak 82b5e10d5b Implement StartFastPairScan
PiperOrigin-RevId: 536487662
2023-05-30 13:08:31 -07:00
Janusz Sobczak 5bad45aed1 Use FastPairDeviceRepository in FastPairSevice
PiperOrigin-RevId: 535386036
2023-05-25 14:25:41 -07:00
Janusz Sobczak 43291da5fd Define scalable seeker API
Defines the scalable seeker skeleton
* FastPairService - singleton FP service instance
* FastPairSeeker - FP interface for plugins
* FastPairPlugin - plugin interface

PiperOrigin-RevId: 534623965
2023-05-23 18:01:27 -07:00
Crisrael Lucero 01c8e1ed05 Convert absl::string_view to const std::string&
PiperOrigin-RevId: 531634295
2023-05-12 16:40:50 -07:00
Janusz Sobczak f1f15bd967 Use canonical MAC address in tests.
PiperOrigin-RevId: 531601021
2023-05-12 14:12:25 -07:00
Qin Wang b19d4fb279 Implement BluetoothClassic Medium for fast pair windows
PiperOrigin-RevId: 531299637
2023-05-11 13:59:42 -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
Guogang Li d510a8ce3c Added cancellable request to network library
PiperOrigin-RevId: 529197083
2023-05-03 15:37:17 -07:00
hai007 465aa7a489 Applied platform thread to network lib
PiperOrigin-RevId: 528521852
2023-05-01 11:13:36 -07:00
Qin Wang 9f6e7f6b84 Refactor Bluetooth Mediums
PiperOrigin-RevId: 528511969
2023-05-01 10:41:29 -07:00
hai007 3da0891479 Automated visibility attribute cleanup.
PiperOrigin-RevId: 523821060
2023-04-12 15:26:27 -07:00
Guogang Li be99b60feb Applied platform thread to network lib
PiperOrigin-RevId: 520998502
2023-03-31 13:23:32 -07:00
Qin Wang 178bfc2897 Enbale ble to connect to Gatt srver
PiperOrigin-RevId: 516896186
2023-03-15 12:22:44 -07:00
Qin Wang f1ad8f4b9a Remove ble_gatt_client from third_party/nearby/fastpair
PiperOrigin-RevId: 514469603
2023-03-06 11:24:58 -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
Qin Wang d0750694ff Replace absl::optional with std::optional
PiperOrigin-RevId: 509649962
2023-02-14 15:10:04 -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
Qin Wang 2330739b90 Migrate TaskRunner from location/nearby to third_party/nearby
PiperOrigin-RevId: 502733409
2023-01-17 17:40:55 -08:00
Qin Wang f94aa7548b Migrate Timer from location/nearby to third_party/nearby
PiperOrigin-RevId: 501928835
2023-01-13 13:44:17 -08:00
Qin Wang 0d58411896 Remove bluetooth_address from location/nearby/cpp/fastpair and third_party/nearby/fastpair
PiperOrigin-RevId: 500821521
2023-01-09 15:23:38 -08:00
Qin Wang d9b6897189 Remove observer_list.h from location/nearby/cpp/fastpair and third_party/nearby/fastpair
PiperOrigin-RevId: 500331550
2023-01-06 22:21:04 -08:00