Skip to content

Commit

Permalink
Update AppTv.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov committed Jul 10, 2024
1 parent 35723a0 commit 30c4dc9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions examples/tv-app/tv-common/src/AppTv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ void ContentAppFactoryImpl::InstallContentApp(uint16_t vendorId, uint16_t produc
mContentApps.emplace_back(std::move(ptr));
}

#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE
// Get the list of node ids
std::set<NodeId> nodeIds = ContentAppPlatform::GetInstance().GetNodeIdsForContentApp(vendorId, productId);

Expand All @@ -673,12 +674,12 @@ void ContentAppFactoryImpl::InstallContentApp(uint16_t vendorId, uint16_t produc
{
auto app = contentApp.get();

// if (app->MatchesPidVid(productId, vendorId))
// {
// CatalogVendorApp vendorApp = app->GetApplicationBasicDelegate()->GetCatalogVendorApp();
if (app->MatchesPidVid(productId, vendorId))
{
CatalogVendorApp vendorApp = app->GetApplicationBasicDelegate()->GetCatalogVendorApp();

// GetContentAppFactoryImpl()->LoadContentApp(vendorApp);
// }
GetContentAppFactoryImpl()->LoadContentApp(vendorApp);
}

// update the list of node ids with content apps allowed vendor list
for (const auto & allowedVendor : app->GetApplicationBasicDelegate()->GetAllowedVendorList())
Expand All @@ -688,7 +689,7 @@ void ContentAppFactoryImpl::InstallContentApp(uint16_t vendorId, uint16_t produc
nodeIds.insert(tempNodeIds.begin(), tempNodeIds.end());
}
}
#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE

// refresh ACLs
for (const auto & nodeId : nodeIds)
{
Expand Down

0 comments on commit 30c4dc9

Please sign in to comment.