summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2021-09-27 03:43:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-09-27 03:43:36 +0000
commit647f163cb8b041afaaa81084d321c35dbdb36bea (patch)
tree8c6ea1e163abca4de4f09e2ffa7e1293c5720636 /core/java/android
parent6e6b476abe0b6960071987f8c2ea354d486a40f2 (diff)
parente48180fb88f62fe929d384e643eceb8cf4631e1c (diff)
Merge "Update javadoc for EditorInfo.actionId usage"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java7
-rw-r--r--core/java/android/view/inputmethod/InputConnection.java5
2 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 4255d88d7587..c6a365e46d24 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -2867,7 +2867,12 @@ public class InputMethodService extends AbstractInputMethodService {
* Ask the input target to execute its default action via
* {@link InputConnection#performEditorAction
* InputConnection.performEditorAction()}.
- *
+ *
+ * <p>For compatibility, this method does not execute a custom action even if {@link
+ * EditorInfo#actionLabel EditorInfo.actionLabel} is set. The implementor should directly call
+ * {@link InputConnection#performEditorAction InputConnection.performEditorAction()} with
+ * {@link EditorInfo#actionId EditorInfo.actionId} if they want to execute a custom action.</p>
+ *
* @param fromEnterKey If true, this will be executed as if the user had
* pressed an enter key on the keyboard, that is it will <em>not</em>
* be done if the editor has set {@link EditorInfo#IME_FLAG_NO_ENTER_ACTION
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index aa28a9203b5e..fdcc208d8edd 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -726,8 +726,9 @@ public interface InputConnection {
* associated with the action.</p>
*
* @param editorAction This must be one of the action constants for
- * {@link EditorInfo#imeOptions EditorInfo.editorType}, such as
- * {@link EditorInfo#IME_ACTION_GO EditorInfo.EDITOR_ACTION_GO}.
+ * {@link EditorInfo#imeOptions EditorInfo.imeOptions}, such as
+ * {@link EditorInfo#IME_ACTION_GO EditorInfo.EDITOR_ACTION_GO}, or the value of
+ * {@link EditorInfo#actionId EditorInfo.actionId} if a custom action is available.
* @return true on success, false if the input connection is no longer
* valid.
*/