Commit Graph
121 Commits
Author SHA1 Message Date
hai007 aefef91114 Add UI Discovery check and show into Mediator.
PiperOrigin-RevId: 538000396
2023-06-05 15:43:24 -07:00
Qin Wang 94b3263b63 Implement PairerBroker for fast pair windows
PiperOrigin-RevId: 537982117
2023-06-05 14:29:36 -07:00
Qin Wang 3dd893dd4c Implement FastPairPairer to handle the pairing process
PiperOrigin-RevId: 537124512
2023-06-01 14:07:22 -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
Suet-Fei Li 7aa1d852f1 Use public link for MessageStream.
PiperOrigin-RevId: 536516027
2023-05-30 14:52:10 -07:00
Janusz Sobczak 82b5e10d5b Implement StartFastPairScan
PiperOrigin-RevId: 536487662
2023-05-30 13:08:31 -07:00
Suet-fei Li 9e37ea08be . 2023-05-27 01:08:14 +00:00
Janusz Sobczak 3adb98a5ff Introduce scanning sessions
FastPairScanner::ScanningSession and ScannerBroker::ScanningSession separate
the lifetime of FastPairScanner/ScannerBroker from the lifetime of scanning
sessions. This simplifies the cleanup.
PiperOrigin-RevId: 535675988
2023-05-26 11:50:54 -07:00
Chun Zhang 4596f32499 Adds Fast Pair account key related proto to communicate with Nearby Service.
PiperOrigin-RevId: 535415537
2023-05-25 15:53:17 -07:00
Janusz Sobczak 5bad45aed1 Use FastPairDeviceRepository in FastPairSevice
PiperOrigin-RevId: 535386036
2023-05-25 14:25:41 -07:00
Qin Wang 55750a0843 Write Accountkey to remote device via GATT connection
PiperOrigin-RevId: 534992810
2023-05-24 14:59:40 -07:00
Qin Wang 6b08c4dda7 Data Parse for subsequent pairing non-discoverable advertisement
PiperOrigin-RevId: 534929577
2023-05-24 11:57:58 -07:00
Qin Wang 1d5abfcc0f Create fast pair data encryptor with Accountkey
PiperOrigin-RevId: 534908947
2023-05-24 11:04:41 -07:00
Janusz Sobczak b80426a043 Inject SingleThreadExecutor in scanning classes
The goal is to use the same background thread for callbacks whenever possible.
It should simplify the locking.

PiperOrigin-RevId: 534632495
2023-05-23 18:34:14 -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
Janusz Sobczak c2fc33038c Define FastPairDeviceRepository
Move onwership of Fast Par Devices to a single point, FastPairDeviceRepository,
which will live inside a singleton FastPairService.

PiperOrigin-RevId: 534547186
2023-05-23 13:54:05 -07:00
Qin Wang d420e9ff33 Fix data_race runtime error for fast_pair_discoverable_scanner_impl_test
PiperOrigin-RevId: 534148116
2023-05-22 12:31:13 -07:00
Qin Wang 9ee02c43ad Pure Refactor callback structure in FastPairDaraParser
PiperOrigin-RevId: 534131868
2023-05-22 11:35:57 -07:00
Qin Wang 363d2a819e Pure refactor set/get functions in FastPairDevice
PiperOrigin-RevId: 533218929
2023-05-18 12:45:55 -07:00
Qin Wang b7d2ee0c45 Add account_key_filter to see the current device is a saved device
PiperOrigin-RevId: 533197294
2023-05-18 11:39:05 -07:00
Janusz Sobczak 1c9dd093f1 Fix retroactive pairing test
PiperOrigin-RevId: 532853830
2023-05-17 11:35:48 -07:00
Qin Wang 60ba057230 Let fake_fast_pair_repository run with SingleThreadExecutor
PiperOrigin-RevId: 532838814
2023-05-17 10:51:04 -07:00
Qin Wang 6d3704f50a Add battery notification and not discoverable advertisement
PiperOrigin-RevId: 532187475
2023-05-15 12:19:45 -07:00
Janusz Sobczak 013bf1f420 Add retroactive pairing
PiperOrigin-RevId: 531637311
2023-05-12 16:56:55 -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
hai007 bd85557710 Add version update in presenter and mock UI Discovery services for further unit test.
PiperOrigin-RevId: 531371755
2023-05-11 19:42:08 -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 b5938c0d17 Add G3 gatt server
PiperOrigin-RevId: 531287485
2023-05-11 13:15:40 -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
Qin Wang 115c286885 Use nearby/internal/platform/mutex instead of absl:mutex
PiperOrigin-RevId: 530727456
2023-05-09 15:20:41 -07:00
Qin Wang 10d3a624b3 Fix fast_pair_wrapper_impl_test
PiperOrigin-RevId: 529545346
2023-05-04 16:30:04 -07:00
Qin Wang 9c5664577e Fix fast_pair_handshake_lookup_test
PiperOrigin-RevId: 529465499
2023-05-04 11:27:56 -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
Qin Wang 37000006c2 Fix callback scope issue
PiperOrigin-RevId: 527764249
2023-04-27 20:36:13 -07:00
Qin Wang a4be31137f Enable manually set log level for fast pair windows
PiperOrigin-RevId: 527343929
2023-04-26 12:37:45 -07:00
Qin Wang 5b602e3033 use std::optional instead of absl::optional
PiperOrigin-RevId: 527329165
2023-04-26 11:44:26 -07:00
Qin Wang 164a3d9b10 Maintain discovered device
PiperOrigin-RevId: 527321179
2023-04-26 11:18:56 -07:00
Qin Wang a826f2d627 Add Pair failure info for fast pair pairing
PiperOrigin-RevId: 527087848
2023-04-25 15:14:20 -07:00
hai007 c9cb329cdd Automated visibility attribute cleanup.
PiperOrigin-RevId: 526877413
2023-04-25 00:10:12 -07:00
Qin Wang cb48598cca Rewrite scanner_broker_impl_test
PiperOrigin-RevId: 526759429
2023-04-24 14:42:58 -07:00
Janusz Sobczak 0e9d578e42 Clean up fetcher test
PiperOrigin-RevId: 526757011
2023-04-24 14:35:11 -07:00
Qin Wang b68f5324ff Refactor FastPairHandshake to avoid locally store fast pair device
PiperOrigin-RevId: 526691078
2023-04-24 10:47:33 -07:00
hai007 c40e011267 Implement Fast Pair UI broker
PiperOrigin-RevId: 525184851
2023-04-18 10:28:33 -07:00
hai007 bf835451b2 Add Discovery action clicked callback.
PiperOrigin-RevId: 524968900
2023-04-17 15:43:06 -07:00
Qin Wang 74def10d7c Implement FastPairHandshakeLookup
PiperOrigin-RevId: 524915633
2023-04-17 12:19:18 -07:00
hai007 3da0891479 Automated visibility attribute cleanup.
PiperOrigin-RevId: 523821060
2023-04-12 15:26:27 -07:00