mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Implemet save_device UX for fast pair windwos
PiperOrigin-RevId: 549693338
This commit is contained in:
committed by
Copybara-Service
parent
0cd8aaab25
commit
be688441aa
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user