Skip to content

Commit

Permalink
[java]fix errorcode in GetConnectedDeviceCallbackForTestJni
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google committed Oct 7, 2024
1 parent b559f17 commit 87ab413
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controller/java/AndroidCallbacks-ForTestJNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ JNI_METHOD(void, GetConnectedDeviceCallbackForTestJni, onDeviceConnected)
}

JNI_METHOD(void, GetConnectedDeviceCallbackForTestJni, onDeviceConnectionFailure)
(JNIEnv * env, jobject self, jlong callbackHandle, jint errorCode)
(JNIEnv * env, jobject self, jlong callbackHandle, jlong errorCode)
{
GetConnectedDeviceCallback * connectedDeviceCallback = reinterpret_cast<GetConnectedDeviceCallback *>(callbackHandle);
VerifyOrReturn(connectedDeviceCallback != nullptr, ChipLogError(Controller, "GetConnectedDeviceCallbackJni handle is nullptr"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public void onDeviceConnected(GetConnectedDeviceCallbackJni callback) {

private native void onDeviceConnected(long callbackHandle, long messagingContextHandle);

public void onDeviceConnectionFailure(GetConnectedDeviceCallbackJni callback, int errorCode) {
public void onDeviceConnectionFailure(GetConnectedDeviceCallbackJni callback, long errorCode) {
onDeviceConnectionFailure(callback.getCallbackHandle(), errorCode);
}

private native void onDeviceConnectionFailure(long callbackHandle, int errorCode);
private native void onDeviceConnectionFailure(long callbackHandle, long errorCode);
}

0 comments on commit 87ab413

Please sign in to comment.