Skip to content

Commit 32200d1

Browse files
authored
Fix Parsing Response Data in Content App Command Delegate (#35605)
* Fix Parsing Response Data in Content App Command Delegate 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 #34895 Tested on Prime Video casting from Android and iOS. Commissioning and casting control were successful. * Fix Parsing Response Data in Content App Command Delegate 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 #34895 Tested on Prime Video casting from Android and iOS. Commissioning and casting control were successful.
1 parent d292892 commit 32200d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/tv-app/android/java/ContentAppCommandDelegate.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,12 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust
219219
void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::HandlerContext & handlerContext, const char * response)
220220
{
221221
handlerContext.SetCommandHandled();
222+
Json::Reader reader;
222223
Json::Value value;
224+
if (!reader.parse(response, value))
225+
{
226+
return;
227+
}
223228

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

0 commit comments

Comments
 (0)