mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Add pair_broker to FastPairMediator/FastPairSeeker
PiperOrigin-RevId: 538592398
This commit is contained in:
committed by
Copybara-Service
parent
f5e67ed034
commit
c786b07fcf
@@ -37,8 +37,7 @@ class MockUIBroker : public UIBroker {
|
||||
observers_.RemoveObserver(observer);
|
||||
}
|
||||
|
||||
void NotifyDiscoveryAction(const FastPairDevice& device,
|
||||
DiscoveryAction action) {
|
||||
void NotifyDiscoveryAction(FastPairDevice& device, DiscoveryAction action) {
|
||||
for (auto& observer : observers_.GetObservers())
|
||||
observer->OnDiscoveryAction(device, action);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class UIBroker {
|
||||
class Observer {
|
||||
public:
|
||||
virtual ~Observer() = default;
|
||||
virtual void OnDiscoveryAction(const FastPairDevice& device,
|
||||
virtual void OnDiscoveryAction(FastPairDevice& device,
|
||||
DiscoveryAction action) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class UIBrokerImplTest : public ::testing::Test, public UIBroker::Observer {
|
||||
ui_broker_->AddObserver(this);
|
||||
}
|
||||
|
||||
void OnDiscoveryAction(const FastPairDevice& device,
|
||||
void OnDiscoveryAction(FastPairDevice& device,
|
||||
DiscoveryAction action) override {
|
||||
on_discovery_action_notified_ = true;
|
||||
discovery_action_ = action;
|
||||
|
||||
Reference in New Issue
Block a user