From 8382f070f081c12fa4617e54009f894b38f5fdc6 Mon Sep 17 00:00:00 2001 From: tinnaliu Date: Mon, 16 Sep 2024 11:51:01 -0700 Subject: [PATCH] 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. --- examples/tv-app/android/java/ContentAppCommandDelegate.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp index caf2d665b8522e..c5c12212fea0fe 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp @@ -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())