From 06453c77ab189c474ac2095055df77f6107511c4 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 26 Apr 2024 07:49:42 +0000 Subject: [PATCH] Restyled by clang-format --- src/controller/java/AndroidICDClient.cpp | 17 +++++++++++------ src/controller/java/AndroidICDClient.h | 4 ++-- .../java/AndroidInteractionClient.cpp | 1 - src/controller/java/CHIPICDClient-JNI.cpp | 3 +-- src/controller/java/MatterICDClient-JNI.cpp | 3 +-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/controller/java/AndroidICDClient.cpp b/src/controller/java/AndroidICDClient.cpp index b916a3bbcae30f..83cb5222576049 100644 --- a/src/controller/java/AndroidICDClient.cpp +++ b/src/controller/java/AndroidICDClient.cpp @@ -28,7 +28,7 @@ chip::app::DefaultICDClientStorage sICDClientStorage; -jobject getICDClientInfo(JNIEnv *env, const char * icdClientInfoSign, jint jFabricIndex) +jobject getICDClientInfo(JNIEnv * env, const char * icdClientInfoSign, jint jFabricIndex) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -69,13 +69,15 @@ jobject getICDClientInfo(JNIEnv *env, const char * icdClientInfoSign, jint jFabr continue; } - err = chip::JniReferences::GetInstance().N2J_ByteArray(env, info.aes_key_handle.As(), + err = chip::JniReferences::GetInstance().N2J_ByteArray(env, + info.aes_key_handle.As(), chip::Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES, jIcdAesKey); VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr, ChipLogError(Controller, "ICD AES KEY N2J_ByteArray error!: %" CHIP_ERROR_FORMAT, err.Format())); - err = chip::JniReferences::GetInstance().N2J_ByteArray(env, info.hmac_key_handle.As(), - chip::Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES, jIcdHmacKey); + err = chip::JniReferences::GetInstance().N2J_ByteArray( + env, info.hmac_key_handle.As(), + chip::Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES, jIcdHmacKey); VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr, ChipLogError(Controller, "ICD HMAC KEY N2J_ByteArray error!: %" CHIP_ERROR_FORMAT, err.Format())); @@ -89,6 +91,9 @@ jobject getICDClientInfo(JNIEnv *env, const char * icdClientInfoSign, jint jFabr } return jInfo; - } +} -chip::app::DefaultICDClientStorage * getICDClientStorage() { return &sICDClientStorage; } +chip::app::DefaultICDClientStorage * getICDClientStorage() +{ + return &sICDClientStorage; +} diff --git a/src/controller/java/AndroidICDClient.h b/src/controller/java/AndroidICDClient.h index 87a2f011e198a4..e5b929e2a9c5f6 100644 --- a/src/controller/java/AndroidICDClient.h +++ b/src/controller/java/AndroidICDClient.h @@ -24,9 +24,9 @@ #pragma once -#include #include +#include -jobject getICDClientInfo(JNIEnv *env, const char * icdClientInfoSign, jint jFabricIndex); +jobject getICDClientInfo(JNIEnv * env, const char * icdClientInfoSign, jint jFabricIndex); chip::app::DefaultICDClientStorage * getICDClientStorage(); diff --git a/src/controller/java/AndroidInteractionClient.cpp b/src/controller/java/AndroidInteractionClient.cpp index 54e1a966540c9a..84506fddcf23d5 100644 --- a/src/controller/java/AndroidInteractionClient.cpp +++ b/src/controller/java/AndroidInteractionClient.cpp @@ -831,7 +831,6 @@ jint getFabricIndex(jlong devicePtr) return static_cast(chipDevice->GetPeerScopedNodeId().GetFabricIndex()); } - /** * Takes objects in attributePathList, converts them to app:AttributePathParams, and appends them to outAttributePathParamsList. */ diff --git a/src/controller/java/CHIPICDClient-JNI.cpp b/src/controller/java/CHIPICDClient-JNI.cpp index 9ccee7eb9a7676..b1fb2574c84465 100644 --- a/src/controller/java/CHIPICDClient-JNI.cpp +++ b/src/controller/java/CHIPICDClient-JNI.cpp @@ -19,8 +19,7 @@ #include -#define JNI_METHOD(RETURN, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipICDClient_##METHOD_NAME +#define JNI_METHOD(RETURN, METHOD_NAME) extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipICDClient_##METHOD_NAME JNI_METHOD(jobject, getICDClientInfo)(JNIEnv * env, jobject self, jint jFabricIndex) { diff --git a/src/controller/java/MatterICDClient-JNI.cpp b/src/controller/java/MatterICDClient-JNI.cpp index f8ed3be9945e9c..45ed4d96c241cb 100644 --- a/src/controller/java/MatterICDClient-JNI.cpp +++ b/src/controller/java/MatterICDClient-JNI.cpp @@ -19,8 +19,7 @@ #include -#define JNI_METHOD(RETURN, METHOD_NAME) \ - extern "C" JNIEXPORT RETURN JNICALL Java_matter_controller_MatterICDClientImpl_##METHOD_NAME +#define JNI_METHOD(RETURN, METHOD_NAME) extern "C" JNIEXPORT RETURN JNICALL Java_matter_controller_MatterICDClientImpl_##METHOD_NAME JNI_METHOD(jobject, getICDClientInfo)(JNIEnv * env, jobject self, jint jFabricIndex) {