summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2021-08-06 16:37:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-08-06 16:37:19 +0000
commita5f1829af2314405d476b6ec82c78be8428af970 (patch)
treeb89c225ea5dd44c6d4c6e6ce3c58877113d33775 /core/java/android
parent1548f793fc7727b398514d79fca1a6c23efb2ecb (diff)
parentbebf16c4948fb8dd890690c548a1f373f75b8e0e (diff)
Merge "Clarify how Handler is used in IC#getHandler()"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/inputmethod/InputConnection.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index ccca031aad3f..5185dc2543c7 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -932,14 +932,20 @@ public interface InputConnection {
boolean requestCursorUpdates(int cursorUpdateMode);
/**
- * Called by the {@link InputMethodManager} to enable application developers to specify a
- * dedicated {@link Handler} on which incoming IPC method calls from input methods will be
- * dispatched.
+ * Called by the system to enable application developers to specify a dedicated thread on which
+ * {@link InputConnection} methods are called back.
*
- * <p>Note: This does nothing when called from input methods.</p>
+ * <p><strong>Editor authors</strong>: although you can return your custom subclasses of
+ * {@link Handler}, the system only uses {@link android.os.Looper} returned from
+ * {@link Handler#getLooper()}. You cannot intercept or cancel {@link InputConnection}
+ * callbacks by implementing this method.</p>
+ *
+ * <p><strong>IME authors</strong>: This method is not intended to be called from the IME. You
+ * will always receive {@code null}.</p>
*
* @return {@code null} to use the default {@link Handler}.
*/
+ @Nullable
Handler getHandler();
/**