Skip to content

Commit

Permalink
Fix Parsing Response Data in Content App Command Delegate
Browse files Browse the repository at this point in the history
Problem: FormatResponseData inside ContentAppCommandDelegate is missing the actual parsing of the reponse data.

Solution: Add back the parsing logic that was accidentally removed in previous PR project-chip#34895

Tested on Prime Video casting from Android and iOS. Commissioning and casting control were successful.
  • Loading branch information
TinnaLiu committed Sep 16, 2024
1 parent 4f35706 commit 8382f07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/tv-app/android/java/ContentAppCommandDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust
void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::HandlerContext & handlerContext, const char * response)
{
handlerContext.SetCommandHandled();
Json::Reader reader;
Json::Value value;
if (!reader.parse(response, value))
{
return;
}

// handle errors from platform-app
if (!value[FAILURE_KEY].empty())
Expand Down

0 comments on commit 8382f07

Please sign in to comment.