diff --git a/fastpair/fast_pair_service.h b/fastpair/fast_pair_service.h index 19d7d938..ee5e4520 100644 --- a/fastpair/fast_pair_service.h +++ b/fastpair/fast_pair_service.h @@ -69,6 +69,12 @@ class FastPairService { // same lifetime as this `FastPairService` instance. AccountManager* GetAccountManager() { return account_manager_.get(); } + // Returns a `FastPairRepository` implementation. The returned object has the + // same lifetime as this `FastPairService` instance. + FastPairRepository* GetFastPairRepository() { + return fast_pair_repository_.get(); + } + private: struct PluginState { // Gets the plugin for `device`. Creates the plugin if it does not exist. diff --git a/fastpair/keyed_service/fast_pair_mediator.h b/fastpair/keyed_service/fast_pair_mediator.h index 40569cfd..7b2fbeef 100644 --- a/fastpair/keyed_service/fast_pair_mediator.h +++ b/fastpair/keyed_service/fast_pair_mediator.h @@ -72,6 +72,10 @@ class Mediator final : public ScannerBroker::Observer, return notification_controller_.get(); } + FastPairRepository* GetFastPairRepository() { + return fast_pair_repository_.get(); + } + void StartScanning(); void StopScanning(); diff --git a/fastpair/proto/proto_builder.cc b/fastpair/proto/proto_builder.cc index e4f6078d..738aaf5a 100644 --- a/fastpair/proto/proto_builder.cc +++ b/fastpair/proto/proto_builder.cc @@ -75,6 +75,8 @@ void BuildFastPairInfo(::nearby::fastpair::proto::FastPairInfo* fast_pair_info, discovery_item.set_first_observation_timestamp_millis( absl::ToInt64Milliseconds(absl::Now() - absl::UnixEpoch())); discovery_item.set_state(proto::StoredDiscoveryItem::STATE_ENABLED); + discovery_item.set_icon_fife_url( + metadata->GetResponse().device().image_url()); discovery_item.set_icon_png(metadata->GetResponse().image()); discovery_item.add_stored_relevances()->mutable_relevance()->set_evaluation( proto::Evaluation::EVALUATION_GREAT);