Commit Graph
232 Commits
Author SHA1 Message Date
Qin Wang 264aa3829f Disable flaky test//third_party/nearby/fastpair/scanning:scanner_broker_impl_test
PiperOrigin-RevId: 570749393
2023-10-04 11:17:59 -07: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
Lucas Silva Shepard 22e7900bb3 [fp-rs] Fixing Presubmit linter issues for autogenerated Flutter code. 2023-08-18 20:12:00 -07:00
Lucas Silva Shepard 02e9cda698 [fp-rs] Comment cleanup. 2023-08-18 19:56:55 -07:00
Lucas Silva Shepard 5f255f1ff5 [fp-rs] Fixing build warnings by removing or annotating unused imports. 2023-08-18 18:11:16 -07:00
Lucas Silva Shepard 90812bfe73 [fp-rs] Making some values const rather than static or inlined. 2023-08-18 17:49:34 -07:00
Lucas Silva Shepard d89d1af459 [fp-rs] Added custom FP error type to Rust code. 2023-08-18 17:49:31 -07:00
Lucas Silva Shepard fb95e26bf5 [fp-rs] Added FP Advertisement unit tests in Rust. 2023-08-15 16:44:48 -07:00
Lucas Silva Shepard 169c04c430 [fp-rs] Split fetcher.rs into directory module, added mock. 2023-08-15 16:44:46 -07:00
Lucas Silva Shepard b1fa76f560 [fp-rs] Wrote unit tests for Fast Pair Decoder in Rust. 2023-08-15 16:44:04 -07:00
Lucas Silva Shepard 748bf9fb18 [fp-rs] Added unit tests to cover common portion of Rust Bluetooth library. 2023-08-15 16:44:04 -07:00
Copybara-Service 59add37c96 Merge pull request #2027 from TheShepord:fpwinrs_flutter
PiperOrigin-RevId: 557279903
2023-08-15 16:03:40 -07:00
Lucas Silva Shepard bdc109324b [fp-rs] Fixing Presubmit Lint warnings for windows/ C++ files. 2023-08-15 15:24:33 -07:00
Lucas Silva Shepard 41be4cca57 [fp-rs] Adding copyright notice under windows/ and bindgen files. 2023-08-15 14:36:39 -07:00
Lucas Silva Shepard f2326f107e [fp-rs] Removing unused macOS, iOS, Android, web and Linux builds. These can be re-added in the future as needed. 2023-08-15 14:00:51 -07:00
Lucas Silva Shepard 3379d0ca3e [fp-rs] Providing second device JSON to test multi-device setup. 2023-08-14 13:36:24 -07:00
Lucas Silva Shepard a683ed6789 [fp-rs] Added device dismissing functionality. The Seeker will ignore a dismissed device's advertisements until a 10s timeout expires. 2023-08-14 13:33:46 -07:00
Lucas Silva Shepard 57373a80c3 [fp-rs] Displaying device image retrieved from model ID. 2023-08-14 13:33:44 -07:00
Lucas Silva Shepard 329e1b298e [fp-rs] Retrieving device information from model ID by parsing local file with serde. 2023-08-14 13:32:25 -07:00
Lucas Silva Shepard a57b55ad98 [fp-rs] Now using model ID instead of BLE address for keeping track of unique devices. 2023-08-14 13:32:22 -07:00
Lucas Silva Shepard f8fb8d4b52 [fp-rs] Flutter UI now only displays the closest discovered device. 2023-08-13 16:52:28 -07:00
Lucas Silva Shepard 0505a23b3f [fp-rs] Added bluetooth pairing button, result displayed in alert dialog. 2023-08-13 16:52:28 -07:00
Lucas Silva Shepard bf05ab5db4 [fp-rs] Invoking Rust code from Dart, retrieving stream of incoming bluetooth advertisements. 2023-08-13 16:52:26 -07:00
Lucas Silva Shepard 2c8809c1e1 [fp-rs] Converted bluetooth module into standalone crate, with fastpair UI provided as an example. 2023-08-13 16:51:16 -07:00
Lucas Silva Shepard 6074e1beba [fp-rs] Set up basic demo for calling Rust from Flutter 2023-08-13 16:51:13 -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
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
Qin Wang 886ac8a2b9 Remove device from local repository when user forget a device
PiperOrigin-RevId: 553269983
2023-08-09 19:04:52 -07:00
Lucas Silva Shepard 80a3b508fa [fp-rs] Providing constructs for generating Rust-side bridge code 2023-08-02 12:25:49 -07:00
Lucas Silva Shepard d7aedea815 [fp-rs] Initial Rust dummy commit for Flutter UI demo 2023-08-02 12:25:48 -07:00
Lucas Silva Shepard c45dd7467d [fp-rs] Initial flutter create commit 2023-08-02 12:25:48 -07:00
Lucas Silva Shepard 20e55d6d78 [fp-rs] Migrating from fastpair/rust to fastpair/rust/bluetooth. 2023-08-02 12:25:48 -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
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
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
Qin Wang 2145ccce69 Fix flaky test:scanner_broker_impl_test
PiperOrigin-RevId: 551329018
2023-07-26 15:16:58 -07:00
Qin Wang 040ed31341 Integrate Dart UX with windows_admin_plugin
PiperOrigin-RevId: 551316220
2023-07-26 14:30:04 -07:00