mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Refresh public certificates after successful pairing.
PiperOrigin-RevId: 928803074
This commit is contained in:
committed by
Copybara-Service
parent
b8dd6b3e27
commit
1f7408b33a
@@ -2690,6 +2690,9 @@ void NearbySharingServiceImpl::OnPeerSyncBindingComplete(
|
||||
.set_binding_id(binding_id)
|
||||
.set_status(TransferMetadata::Status::kComplete)
|
||||
.build());
|
||||
|
||||
// Download public certificates again to update the newly added sync binding.
|
||||
certificate_manager_->DownloadPublicCertificates();
|
||||
}
|
||||
|
||||
void NearbySharingServiceImpl::OnReceivedIntroduction(
|
||||
|
||||
@@ -5219,6 +5219,8 @@ TEST_F(NearbySharingServiceImplTest, InitiatePairingSuccess) {
|
||||
EXPECT_FALSE(
|
||||
fake_nearby_connections_manager_->connection_endpoint_info(kEndpointId)
|
||||
.has_value());
|
||||
// Once from RegisterSendSurface and once from OnPeerSyncBindingComplete.
|
||||
EXPECT_EQ(certificate_manager()->num_download_public_certificates_calls(), 2);
|
||||
|
||||
std::optional<nearby::sharing::sync::SyncBindingPrefs> binding =
|
||||
preference_manager_.GetSyncBindingValue();
|
||||
|
||||
Reference in New Issue
Block a user