Internal change

PiperOrigin-RevId: 365062363
This commit is contained in:
hai007
2021-03-25 09:56:08 -07:00
committed by Copybara-Service
parent abaac41f1b
commit 55b5d1a194
7 changed files with 72 additions and 8 deletions
+9
View File
@@ -511,6 +511,15 @@ bool MediumEnvironment::GetUseValidPeerConnection() {
return use_valid_peer_connection_;
}
void MediumEnvironment::SetPeerConnectionLatency(
absl::Duration peer_connection_latency) {
peer_connection_latency_ = peer_connection_latency;
}
absl::Duration MediumEnvironment::GetPeerConnectionLatency() {
return peer_connection_latency_;
}
void MediumEnvironment::RegisterWifiLanMedium(api::WifiLanMedium& medium) {
if (!enabled_) return;
RunOnMediumEnvironmentThread([this, &medium]() {
+6
View File
@@ -153,6 +153,11 @@ class MediumEnvironment {
bool GetUseValidPeerConnection();
// Used to set latency when creating the peer connection in tests.
void SetPeerConnectionLatency(absl::Duration peer_connection_latency);
absl::Duration GetPeerConnectionLatency();
// Adds medium-related info to allow for scanning/advertising to work.
// This provides acccess to this medium from other mediums, when protocol
// expects they should communicate.
@@ -319,6 +324,7 @@ class MediumEnvironment {
wifi_lan_mediums_;
bool use_valid_peer_connection_ = true;
absl::Duration peer_connection_latency_ = absl::ZeroDuration();
};
} // namespace nearby