From b2cb4c9aa2c15425cae6eae0164df293a54d3b4b Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Wed, 30 Aug 2023 23:15:31 +0900 Subject: [PATCH] [Android] Fix Android read attribute error (#28963) * Fix Android attribute read issue * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/controller/java/AndroidCallbacks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index 1598567e212880..4c3e05051a9d4e 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -230,9 +230,9 @@ CHIP_ERROR ConvertReportTlvToJson(const uint32_t id, TLV::TLVReader & data, std: { TLV::TLVWriter writer; TLV::TLVReader readerForJavaTLV; - uint32_t size = 0; - size_t bufferLen = readerForJavaTLV.GetTotalLength() + EXTRA_SPACE_FOR_ATTRIBUTE_TAG; + uint32_t size = 0; readerForJavaTLV.Init(data); + size_t bufferLen = readerForJavaTLV.GetTotalLength() + EXTRA_SPACE_FOR_ATTRIBUTE_TAG; std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); writer.Init(buffer.get(), bufferLen); TLV::TLVType outer;