Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 7395b2c

Browse files
author
Ian Macphail
committed
[[ Bug 22700 ]] Fix crash on enter in android native field widget
This patch fixes a crash caused by an error calling an LCB handler from Java where a Java Object parameter may be nil but the handler does not declare the parameter as optional.
1 parent 3779ac7 commit 7395b2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/widgets/androidfield/androidfield.lcb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ __safe foreign handler _JNI_TextWatcher_TextChangedListener(in pCallbacks as Arr
851851
__safe foreign handler _JNI_TextView_addTextChangedListener(in pObj as JObject, in pParam_watcher as JObject) returns nothing \
852852
binds to "java:android.widget.TextView>addTextChangedListener(Landroid/text/TextWatcher;)V?ui"
853853

854-
handler type EditorActionCallback(in pView as JObject, in pActionId as JObject, in pKeyEvent as JObject) returns JObject
854+
handler type EditorActionCallback(in pView as JObject, in pActionId as JObject, in pKeyEvent as optional JObject) returns JObject
855855
__safe foreign handler _JNI_View_OnEditorActionListener(in pHandler as EditorActionCallback) returns JObject \
856856
binds to "java:android.widget.TextView$OnEditorActionListener>interface()"
857857
__safe foreign handler _JNI_TextView_setOnEditorActionListener(in pObj as JObject, in pParam_listener as JObject) returns nothing \
@@ -1074,7 +1074,7 @@ __safe foreign handler _JNI_Boolean_False() returns JObject \
10741074
binds to "java:java.lang.Boolean>get.FALSE()Ljava/lang/Boolean;!static"
10751075
__safe foreign handler _JNI_Boolean_True() returns JObject \
10761076
binds to "java:java.lang.Boolean>get.TRUE()Ljava/lang/Boolean;!static"
1077-
handler OnEditorAction(in pView as JObject, in pActionId as JObject, in pKeyEvent as JObject) returns JObject
1077+
handler OnEditorAction(in pView as JObject, in pActionId as JObject, in pKeyEvent as optional JObject) returns JObject
10781078
post "returnKey"
10791079

10801080
// Return value determines whether the return key event is eaten

0 commit comments

Comments
 (0)