Skip to content

Commit

Permalink
Update AndroidDeviceControllerWrapper.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google authored May 23, 2024
1 parent eb9b482 commit 63c753d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/controller/java/AndroidDeviceControllerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ void AndroidDeviceControllerWrapper::OnICDRegistrationComplete(chip::NodeId icdN

CHIP_ERROR AndroidDeviceControllerWrapper::SyncGetKeyValue(const char * key, void * value, uint16_t & size)
{
ChipLogProgress(chipTool, "KVS: Getting key %s", StringOrNullMarker(key));
ChipLogProgress(Controller, "KVS: Getting key %s", StringOrNullMarker(key));

size_t read_size = 0;

Expand All @@ -1078,19 +1078,20 @@ CHIP_ERROR AndroidDeviceControllerWrapper::SyncGetKeyValue(const char * key, voi

CHIP_ERROR AndroidDeviceControllerWrapper::SyncSetKeyValue(const char * key, const void * value, uint16_t size)
{
ChipLogProgress(chipTool, "KVS: Setting key %s", StringOrNullMarker(key));
ChipLogProgress(Controller, "KVS: Setting key %s", StringOrNullMarker(key));
return chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr().Put(key, value, size);
}

CHIP_ERROR AndroidDeviceControllerWrapper::SyncDeleteKeyValue(const char * key)
{
ChipLogProgress(chipTool, "KVS: Deleting key %s", StringOrNullMarker(key));
ChipLogProgress(Controller, "KVS: Deleting key %s", StringOrNullMarker(key));
return chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr().Delete(key);
}

void AndroidDeviceControllerWrapper::StartDnssd()
{
FabricTable * fabricTable = DeviceControllerFactory::GetInstance().GetSystemState()->Fabrics();
VerifyOrReturn(fabricTable != nullptr, ChipLogError(controller, "Fail to get fabricTable in StartDnssd"));
chip::app::DnssdServer::Instance().SetFabricTable(fabricTable);
chip::app::DnssdServer::Instance().StartServer();
}
Expand Down

0 comments on commit 63c753d

Please sign in to comment.