Commit Graph
240 Commits
Author SHA1 Message Date
Francis Tsui c2ade33c9c No public changes.
PiperOrigin-RevId: 597033150
2024-01-09 13:46:42 -08:00
Francis Tsui 63e744e133 Finish migrating account_manager.h to new location.
PiperOrigin-RevId: 592074168
2023-12-18 19:11:52 -08: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
Copybara-Service ac887e55a9 Merge pull request #2125 from google:dependabot/pub/fastpair/rust/demo/archive-3.3.8
PiperOrigin-RevId: 572967743
2023-10-12 11:38:39 -07:00
Anay Wadhera 0d8ffabe08 Lock flutter_rust_bridge to 1.80.1 2023-10-12 05:03:19 +00:00
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
dependabot[bot] 8b20e22414 Bump archive from 3.3.7 to 3.3.8 in /fastpair/rust/demo
Bumps [archive](https://github.com/brendan-duncan/archive) from 3.3.7 to 3.3.8.
- [Changelog](https://github.com/brendan-duncan/archive/blob/main/CHANGELOG.md)
- [Commits](https://github.com/brendan-duncan/archive/compare/3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: archive
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-15 17:22:19 +00: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