summaryrefslogtreecommitdiffstats
path: root/core/java/android/inputmethodservice
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-03-25 11:02:00 +0900
committerYohei Yukawa <yukawa@google.com>2014-04-04 04:34:44 +0900
commitb7b7907fb5e4b2252b3c594a6bc4402217fe662a (patch)
tree82c3d4a9b9d44192d4d76ef262333fe27a2724bf /core/java/android/inputmethodservice
parent10a5ec230f41fcfba7bdd0acb32f7bb113eba3da (diff)
downloadframeworks_base-b7b7907fb5e4b2252b3c594a6bc4402217fe662a.zip
frameworks_base-b7b7907fb5e4b2252b3c594a6bc4402217fe662a.tar.gz
frameworks_base-b7b7907fb5e4b2252b3c594a6bc4402217fe662a.tar.bz2
Allow IMEs to start/stop receiving onUpdateCursor callback
This CL introduces an API which allows IMEs to start/stop receiving onUpdateCursor callback upon their request. BUG: 13388665 Change-Id: I987326872def181dda5d9d701b762f088e0d9c39
Diffstat (limited to 'core/java/android/inputmethodservice')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index a355d1e..c51d1a7 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -249,6 +249,16 @@ public class InputMethodService extends AbstractInputMethodService {
*/
public static final int IME_VISIBLE = 0x2;
+ /**
+ * The IME does not require cursor/anchor position.
+ */
+ public static final int CURSOR_ANCHOR_MONITOR_MODE_NONE = 0x0;
+
+ /**
+ * The IME expects that {@link #onUpdateCursor(Rect)} is called back.
+ */
+ public static final int CURSOR_ANCHOR_MONITOR_MODE_CURSOR_RECT = 0x1;
+
InputMethodManager mImm;
int mTheme = 0;
@@ -1702,6 +1712,13 @@ public class InputMethodService extends AbstractInputMethodService {
}
/**
+ * Update the cursor/anthor monitor mode.
+ */
+ public void setCursorAnchorMonitorMode(int monitorMode) {
+ mImm.setCursorAnchorMonitorMode(mToken, monitorMode);
+ }
+
+ /**
* Close this input method's soft input area, removing it from the display.
* The input method will continue running, but the user can no longer use
* it to generate input by touching the screen.