diff --git a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt index 37d8fb4b3612ee..2b8d465d1c4f3a 100644 --- a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt +++ b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/GenericChipDeviceListener.kt @@ -39,7 +39,7 @@ open class GenericChipDeviceListener : ChipDeviceController.CompletionListener { // No op } - override fun onOpCSRGenerationComplete(errorCode: ByteArray) { + override fun onOpCSRGenerationComplete(csr: ByteArray) { // No op } } diff --git a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt index c951b2d834c241..dbf805d44c9952 100644 --- a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt +++ b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt @@ -135,8 +135,8 @@ class DeviceProvisioningFragment : Fragment() { } } - override fun onOpCSRGenerationComplete(errorCode: ByteArray) { - Log.d(TAG,String(errorCode)) + override fun onOpCSRGenerationComplete(csr: ByteArray) { + Log.d(TAG, String(csr)) } override fun onPairingDeleted(code: Int) { diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 278116e2dec140..06d2dc168f3fb5 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -197,11 +197,11 @@ AndroidDeviceControllerWrapper::GenerateNodeOperationalCertificate(const Optiona onNOCGenerated->mCall(onNOCGenerated->mContext, ByteSpan(noc.Get(), nocLen)); - jbyteArray argument; + jbyteArray javaCsr; JniReferences::GetInstance().GetEnvForCurrentThread()->ExceptionClear(); JniReferences::GetInstance().N2J_ByteArray(JniReferences::GetInstance().GetEnvForCurrentThread(), csr.data(), csr.size(), - argument); - JniReferences::GetInstance().GetEnvForCurrentThread()->CallVoidMethod(mJavaObjectRef, method, argument); + javaCsr); + JniReferences::GetInstance().GetEnvForCurrentThread()->CallVoidMethod(mJavaObjectRef, method, javaCsr); return generateCert; } diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 6ffddc82715d9c..a5e7ac8b91b168 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -118,9 +118,9 @@ public void onPairingComplete(int errorCode) { } } - public void onOpCSRGenerationComplete(byte[] errorCode) { + public void onOpCSRGenerationComplete(byte[] csr) { if (completionListener != null) { - completionListener.onOpCSRGenerationComplete(errorCode); + completionListener.onOpCSRGenerationComplete(csr); } } @@ -287,6 +287,6 @@ public interface CompletionListener { void onError(Throwable error); /** Notifies the Commissioner when the OpCSR for the Comissionee is generated. */ - void onOpCSRGenerationComplete(byte[] errorCode); + void onOpCSRGenerationComplete(byte[] csr); } }