Skip to content

Commit

Permalink
Local test for 3p API
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 700458134
  • Loading branch information
hai007 authored and copybara-github committed Nov 27, 2024
1 parent 4c025b2 commit 4714bf8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions sharing/certificates/nearby_share_certificate_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ NearbyShareCertificateManagerImpl::Factory::Create(
nearby::sharing::api::SharingRpcClientFactory* client_factory) {
DCHECK(context);


LOG(INFO) << "GGG Overriding flags from certificate manager create().";
// Force use of gRpc client when running SDK server.
NearbyFlags::GetInstance().OverrideBoolFlagValue(
sharing::config_package_nearby::nearby_sharing_feature::kUseGrpcClient,
true);
// Force use of call nearby identity API when running SDK server.
NearbyFlags::GetInstance().OverrideBoolFlagValue(
sharing::config_package_nearby::nearby_sharing_feature::
kCallNearbyIdentityApi,
true);
if (test_factory_) {
return test_factory_->CreateInstance(context, local_device_data_manager,
contact_manager, profile_path,
Expand Down Expand Up @@ -449,6 +460,14 @@ void NearbyShareCertificateManagerImpl::DownloadPublicCertificates() {
void NearbyShareCertificateManagerImpl::UploadLocalDeviceCertificates() {
executor_->PostTask([&]() {
LOG(INFO) << "Start to upload local device certificates.";
LOG(INFO) << "Inside upload, GGG flags: kCallNearbyIdentityApi:"
<< NearbyFlags::GetInstance().GetBoolFlag(
config_package_nearby::nearby_sharing_feature::
kCallNearbyIdentityApi);
LOG(INFO)
<< "Inside upload, GGG flags: kUseGrpcClient:"
<< NearbyFlags::GetInstance().GetBoolFlag(
config_package_nearby::nearby_sharing_feature::kUseGrpcClient);

if (!is_running()) {
LOG(WARNING)
Expand Down

0 comments on commit 4714bf8

Please sign in to comment.