Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Rename onOpCSRGenerationComplete() parameter #8522

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ open class GenericChipDeviceListener : ChipDeviceController.CompletionListener {
// No op
}

override fun onOpCSRGenerationComplete(errorCode: ByteArray) {
override fun onOpCSRGenerationComplete(csr: ByteArray) {
tcarmelveilleux marked this conversation as resolved.
Show resolved Hide resolved
// No op
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/controller/java/AndroidDeviceControllerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
}
}