Commit Graph
38 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 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 2145ccce69 Fix flaky test:scanner_broker_impl_test
PiperOrigin-RevId: 551329018
2023-07-26 15:16:58 -07:00
Qin Wang eec9c98a95 Refactor fast_pair_discoverable_scanner
PiperOrigin-RevId: 549081197
2023-07-18 12:41:23 -07:00
Qin Wang 99053e4df3 Implement scanner for fast pair subsequent pairing
PiperOrigin-RevId: 548841808
2023-07-17 17:20:01 -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
Qin Wang 61820e49fb BugFix //third_party/nearby/fastpair/scanning/fastpair:fast_pair_discoverable_scanner_impl_test
PiperOrigin-RevId: 546253578
2023-07-07 05:38:00 -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
Qin Wang 5b6ba679c7 Download device's metadata using FastPairClient::GetObservedDevice to call fast pair backend API
PiperOrigin-RevId: 545809920
2023-07-05 16:01:20 -07:00
Janusz Sobczak 3cf20ee3bc Store metadata in FastPairDevice
Add DeviceMetadata to FastPairDevice after downloading it.
It simplifies the code and prevents fetching the same metadata several times.
FastPairDataEncryptorImpl does not download the metadata anymore. Metadata
must have already been downloaded, otherwise we wouldn't know what FP protocol
to use.

PiperOrigin-RevId: 542490742
2023-06-22 01:48:56 -07:00
Janusz Sobczak 4914cbc2f9 Set FastPairDevice version
PiperOrigin-RevId: 541030067
2023-06-16 16:00:31 -07:00
Janusz Sobczak 82b5e10d5b Implement StartFastPairScan
PiperOrigin-RevId: 536487662
2023-05-30 13:08:31 -07: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
Janusz Sobczak 5bad45aed1 Use FastPairDeviceRepository in FastPairSevice
PiperOrigin-RevId: 535386036
2023-05-25 14:25:41 -07:00
Qin Wang 6b08c4dda7 Data Parse for subsequent pairing non-discoverable advertisement
PiperOrigin-RevId: 534929577
2023-05-24 11:57:58 -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 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 b19d4fb279 Implement BluetoothClassic Medium for fast pair windows
PiperOrigin-RevId: 531299637
2023-05-11 13:59:42 -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 9f6e7f6b84 Refactor Bluetooth Mediums
PiperOrigin-RevId: 528511969
2023-05-01 10:41:29 -07:00
Qin Wang 164a3d9b10 Maintain discovered device
PiperOrigin-RevId: 527321179
2023-04-26 11:18:56 -07:00
Qin Wang cb48598cca Rewrite scanner_broker_impl_test
PiperOrigin-RevId: 526759429
2023-04-24 14:42:58 -07:00
Guogang Li 8a66bff097 Made observer list thread safe
PiperOrigin-RevId: 520713657
2023-03-30 12:36:11 -07:00
Janusz Sobczak 94630e75ea Promote FpDevice to a class
PiperOrigin-RevId: 520430547
2023-03-29 13:51:11 -07:00
Qin Wang 564bca0a85 Refactor unit test for fast pair scanner and add mock_scanner_broker
PiperOrigin-RevId: 520386239
2023-03-29 11:06:04 -07:00
Qin Wang 53d4f55e70 Immediate convert ByteArray to string to avoid using ByteArray in Fast Pair internal code
PiperOrigin-RevId: 514833850
2023-03-07 14:06:33 -08:00
Qin Wang 2eff1c383c Change TaskRunner to be unique_ptr
PiperOrigin-RevId: 513858401
2023-03-03 10:15:30 -08:00
Qin Wang 9f49719492 RefactorConstant
PiperOrigin-RevId: 513577039
2023-03-02 10:34:12 -08:00
Qin Wang d0750694ff Replace absl::optional with std::optional
PiperOrigin-RevId: 509649962
2023-02-14 15:10:04 -08:00
Qin Wang dcc4ed0249 Implement Fast Pair scanner broker
PiperOrigin-RevId: 509593803
2023-02-14 11:47:21 -08:00
Qin Wang 1d01973d17 Fix Metadata downloading callback issue
PiperOrigin-RevId: 508767628
2023-02-10 15:25:35 -08:00
Qin Wang 5cb25a1a70 Implement Fast Pair discoverable scanner
PiperOrigin-RevId: 508484936
2023-02-09 15:01:54 -08:00
Qin Wang c52f1a4000 Implement Fast Pair scanner
PiperOrigin-RevId: 506807562
2023-02-02 21:57:35 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
Qin Wang f73b23e720 Implement Protocol, Constant
PiperOrigin-RevId: 494858330
2022-12-12 16:21:35 -08:00
Qin Wang 00b1a1570e Implement FastPairScanner
PiperOrigin-RevId: 490621670
2022-11-23 18:10:43 -08:00