As-is FastPairDeviceRepository is destroyed before SingleThreadExecutor which
can run tasks depending on FastPairDeviceRepository.
This CL makes sure there is no users of FastPairDeviceRepository when
it's deleted.
PiperOrigin-RevId: 546977517
ExceptionOr<T>::ok() returns true if the value is set. This can be misleading
for boolean types.
ExceptionOr<bool> result = SomeFunction();
if (result.ok()) {
if (result.result() {
// Case 1: SomeFunction returned true
} else {
// Case 2: SomeFunction returned false
} else {
// Case 3: SomeFunction returned an exception
}
It's easy to overlook case 2.
The specialized ExceptionOr<bool>::ok() returns false in Case 2, which allows
us to write:
if (result) {
// SomeFunction returned true
} else {
// SomeFunction returned false or an exception
// result.GetException() can be used if we need to handle different exceptions
// differenty
}
PiperOrigin-RevId: 544715641
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
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
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
- Branch class Listener from google3/location/nearby/cpp/sharing/clients/dart/platform/lib/listener.dart for further use of listening the change from notification controller.
- Create Device Metadata to store the device information relating to UI showing.
- Create binding class to bind C++ libraries to dart language.
PiperOrigin-RevId: 540644654
- callback: transfer device C++ proto to dart proto
- device: transfer metadata that get from the observer to dart proto
- enum: transfer Discovery Action class to dart proto
PiperOrigin-RevId: 538935072