Skip to content

Commit

Permalink
Update per comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov committed Jun 18, 2024
1 parent 7e05e43 commit 8a3dae8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/tv-app/android/java/TVApp-JNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,15 @@ class MyPincodeService : public PasscodeService
};
MyPincodeService gMyPincodeService;

class MyAppInstallationService : public AppInstallationService
class SampleTvAppInstallationService : public AppInstallationService
{
bool LookupTargetContentApp(uint16_t vendorId, uint16_t productId) override
{
return ContentAppPlatform::GetInstance().LoadContentAppByClient(vendorId, productId) != nullptr;
}
};

MyAppInstallationService gMyAppInstallationService;
SampleTvAppInstallationService gSampleTvAppInstallationService;

class MyPostCommissioningListener : public PostCommissioningListener
{
Expand Down Expand Up @@ -382,7 +382,7 @@ void TvAppJNI::InitializeCommissioner(JNIMyUserPrompter * userPrompter)
if (cdc != nullptr && userPrompter != nullptr)
{
cdc->SetPasscodeService(&gMyPincodeService);
cdc->SetAppInstallationService(&gMyAppInstallationService);
cdc->SetAppInstallationService(&gSampleTvAppInstallationService);
cdc->SetUserPrompter(userPrompter);
cdc->SetPostCommissioningListener(&gMyPostCommissioningListener);
}
Expand Down
3 changes: 2 additions & 1 deletion examples/tv-app/tv-common/include/AppTv.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory
// Remove the app from the list of mContentApps
bool UninstallContentApp(uint16_t vendorId, uint16_t productId);
// Print mContentApps and endpoints
void PrintInstalledApps();
void LogInstalledApps();
// TODO: method to retireve list of mContentApps

protected:
std::vector<std::unique_ptr<ContentAppImpl>> mContentApps;
Expand Down
2 changes: 1 addition & 1 deletion examples/tv-app/tv-common/src/AppTv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ bool ContentAppFactoryImpl::UninstallContentApp(uint16_t vendorId, uint16_t prod
return false;
}

void ContentAppFactoryImpl::PrintInstalledApps()
void ContentAppFactoryImpl::LogInstalledApps()
{
for (auto & contentApp : mContentApps)
{
Expand Down
1 change: 1 addition & 0 deletions src/controller/CommissionerDiscoveryController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ void CommissionerDiscoveryController::InternalOk()
ChipLogDetail(AppServer, "UX InternalOk: app not installed.");

// TODO: Prepare app to be installed or add it to the mContentApps
// Draft PR: https://github.com/project-chip/connectedhomeip/pull/33982
}

if (client->GetUDCClientProcessingState() != UDCClientProcessingState::kPromptingUser)
Expand Down

0 comments on commit 8a3dae8

Please sign in to comment.